Development Update 1


To start off with, I created a constants header file to hold names of each of the rooms, the names of all the items, and a list of all the directions you can go in each room. I saved each as a constant string and then assigned them into an array (shown in images 1 and 2).

I then created an initialise rooms function in Game.cpp to, as I'm sure you can guess by the name, initialise the rooms and assign them each the correct room name, possible directions and if the room is meant to have an item then that is assigned as well. The room names and directions were set using a for loop for efficiency and the items were assigned manually as there are only a handful of items in comparison to the total number of rooms in the game map (image 3).

Image 4 shows a snippet of the renderer function which produces the output to the console as seen in image 5.

Get Haunted House

Leave a comment

Log in with itch.io to leave a comment.