Development Update 2


The next step in the process was to read the users input. This can be seen in image 1. The nested if statements first check to see if the game is in progress, the checks to see if you pressed enter or backspace. If you pressed enter then it calls the CheckInput() function. If you pressed backspace then it removes the last character you entered from the input string. If you didn't press either enter or backspace then it adds the letter you pressed to the input string.

Image 2 shows the section of the renderer that displays the input.

The code snippet in image 3 shows part of the CheckInput() function. It checks to see if the input length is 1 because if it is then it is likely to be a movement direction so checks the input against the possible exits of that room.

Get Haunted House

Leave a comment

Log in with itch.io to leave a comment.