Hello Guys,
I am attempting to develop a map system for text based rpg I am working. I am wondering if anyone here might have some thoughts on how to implement it.
I was thinking of having a class called rooms that was similar to the below.
Then I would have a DungeonMap class that would have a list of rooms and functions to allow the movement between rooms based on the presence of an exit from the current room. It would basically work like a tree structure that the player can traverse.Code:enum EXIT_DIRECTION { NORTH, SOUTH...} Rooms ---------------------------------------------------------- string _roomID (uniqueIdentifier or hash of desc) string _roomDesc ( a description of the room) List<Enemies> _enemies (a list of the enemies in the room) Inventory _roomInventory (a list of items in the room ) Map<exitDirection, roomID> _exits ( a map exit directions of connecting rooms )
Am I on the right path here or does this problem need a different type of solution.
Lucas cage