A small, browser-compatible simulation game currently in the making as an in-between project. You play as Harry, a white collar worker, and you’ll be managing the time he spends on his friends, his family and a high-pressure project for his office job. The entire game is aimed to take less than 30 minutes to complete.
Click on the image below to play an early prototype version of this game – now with sound effects and a looping soundtrack: part of the song Limerence by Yves Tumor.
Code examples and design choices
Design: Addressing loneliness among the elderlyWhile the immediate goal of this game is to maintain the balance between your workload, private life and stress level until the project ends, the real goal is to read between the lines of the text messages Harry receives from his lonely mother and acting on them. For this, the unaware player will, at some point in the game, have to make the conscious decision to prioritise quality time with Harry’s mother, making sacrifices in other aspects of his life while doing so.
Eventually, regardless of the player’s actions, the mother passes away. If Harry hadn’t spent enough time with her by then, the game ends with a bad ending. If they had, the game ends with a good ending.
If the player ends the game with the good ending, they are probably already quite aware of possible signs in ther surroundings. If the player ends the game with the bad ending, they will be kindly reminded to think about the issue – it is so easy to forget about the people we love silently suffering while we’re too busy living our own lives.
Flow diagram: Player choices and hidden variables Code: Dialogue system initialisation
While I’m aware that this is not the most elegant way to implement a proper dialogue tree, it did the job for this project pretty decently. After being added to a dictionary on the DialogueManager’s Awake() call, it can be accessed with the corresponding DialogueKey enum.
When a sentence is displayed, the DialogueManager determines which chathead belongs to the speaker’s name and on which side of the dialogue window it should be displayed.
Sentences that require a certain condition to be met before showing up are declared as follows:
_isCurrentlyTypingText is a private variable that can be set to false by clicking on the dialogue window while text is being typed.
When that happens, all text is typed out immediately and the loop ends.
To see more of this project’s code, you can visit its repository on GitHub.