Point me in the right direction, please!
So, I've got a basic (albeit, over engineered ) text-RPG system down. Rooms, with characters inside of them, and items inside of those. Characters can move, interact, get items, etc. There's a class that parses player-input-commands and is imported by the main game loop—so the basics are there. Now that I have all the basic systems down, I'd like to start creating and storing the world, but am at somewhat of a loss as to how to do this.
I'm using C++, and can think of several things:
- Hardcoding the creation of each object and its containers in C++. For testing purposes, this is working for now, but it's not a long-term solution
- An SQL database - which I really want to use, just because I think it'd be a good learning experience). This would require learning a C++ interface for SQL (or maybe a non-SQL database like MongoDB). I'm looking at SQLite now.
- Text files - which I don't want to use, but might be easier. I'd do something like have a "Rooms" file, a "Characters" file, and an "Items" file or something. I'd then have to figure out a way of getting C++ to read the appropriate lines from these files and use them to instantiate the respective objects
- JSON, XML, etc. - which I don't fully understand, but think it's something that turns strings into numbers for easy storage and recalling. Might it be the interface through which
Rooms will probably have to be hard "coded" at first (until I get to random-room generation!) Items and characters (i.e. - monsters) I'd like to randomly generate.
So, what do you guys use, and how do you use/implement it?