You Are Not Alone is a 2D puzzle platformer made in Unity for a 48 hour game jam BYOG 2021. The game is available at itch.io.
- Role: Game Programmer
- Team Size: 2
- Time Frame: 48 hours
- Engine: Unity
Introduction
It is a puzzle platformer game made for a 48 hour game jam. The theme for the jam was Two Views. Player can switch between it’s second view to solve puzzles.
While working on the game, I mainly focused on the dialogue system. We only had 48 hours so the dialogue system was very basic. I also helped in the user interface of the game.
Dialogue System
While playing the game, player can see the dialogue only if it interacts with the npc. I created a DialogueTrigger class which checks whether the player is close to the npc or not and tells the DialogueManager that player is ready for npc dialogue.
Each dialogue sentence is stored in a string array in Dialogue class. The DialogueManager then types each sentence according to the user input.
public class Dialogue
{
public string name;
[TextArea(3, 10)]
public string[] sentences;
}
IEnumerator TypeSentence(string sentence)
{
dialogueText.text = "";
foreach(char letter in sentence.ToCharArray())
{
dialogueText.text += letter;
yield return new WaitForSeconds(0.01f);
}
}