Additional Functionality
Since the last update, I have introduced a lot of game functionality. Getting the text input was the most significant hurdle, and now that it is complete, it has been smooth sailing. I have added the following functionality to the game: inventory system, picking up items, dropping items, using various items, the ability to open locked doors, and accurate checking if the player can go in the given direction.
The inventory was handled through each item being initialised at the start of the game. They are initialised with a location between 0 and 64. When the player picks it up with the TAKE command, the location is set to -1, in the player's inventory. Dropping items is handled similarly, simply setting the item's location to player_location when the DROP command is entered.
The item usage simply checks whether the player has the item (through the aforementioned inventory system) and that the player is in a correct room to use the item. If both checks pass, the item then performs whatever action it needs to.
Get Haunted House
Haunted House
Port of a text adventure made in BASIC to modern C++ for my Low-Level Programming module
Status | Released |
Author | MachJacob |
Tags | Creepy, Text based |
Languages | English |
More posts
- PostmortemApr 11, 2019
- Text Input!Apr 07, 2019
- Player LocationApr 07, 2019
- The port beginsJan 04, 2019
- Starting PointNov 18, 2018
Leave a comment
Log in with itch.io to leave a comment.