Command Prompt Text based game engine
Again this project wasnt exactly something i had in mind, but was an assignment for university as a learning exersise in how different data structures are used in games, therefore not much in the way of graphics was required
All players and non player characters are able to be edited via text file to change key attributes and items they are carrying
All areas and map data can be edited via text file to change key attributes and items / players that are in that area at start-up.
All items and there corresponding properties and values can be edited via text file
Is possible to modify the validation of the command list via text file, as i have set-up a state machine to determine some of the game logic it is possible to set which command type (scripted in the buttons data files) can then move onto different command types. Allowing for multiple commands and processing them individually as required, it would be possible to allow for massive commands that stretched to multiple depths if the user was to modify the state data
all default buttons and processes can be set prior to start-up so the interface is pretty much completely user configurable, in a future revision i will do the same for all game data etc. so it is more flexible
its possible to pick-up items
its possible to drop items
its possible command non-player characters to do the same actions that the player can perform themselves, this is possible through the use of the state machine
is possible to lock an area so it can only opened by an item set in its properties as a “required item”, when this item is used in an area previous to it it unlocks the area
all text associated with an area is loaded from text file
movement validation is performed by comparing the direction the player wants to move against the areas in the map, if the player wants to move in an invalid direction it is ignored, if the player wants to move in a valid direction it is allowed
if a non player character is declared as “deadly” when you attempt to leave an area the non player character will kill you and it is game over
its also possible to make an item “destroy on use” so if an item is breakable or consumable it would be possible to make it smash or get eaten if that's the nature of the item, its very possible for me to add more items, i just figured for the scope of this project ill stick with a minimum but make it very expandable
killing another character results in them dropping any items contained within there inventory
its possible to set a characters “player controllable” property in order to let the player control or not control character
It is availible for download here: Text Adventure (right click and save as)
i have included the source code, feel free to modify / improve wherever you want as long as you send me the results ;-)
No comments:
Post a Comment