So for practice and as a learning exercise i foolishly decided to make a text based rpg on my phone using the c4droid ide. ive done well and have learned a lot.
So far you can create a new character or load the previous one. and you can walk around in the rooms ive made. currently the rooms load from a file when you enter it, and then it loads again every time you do anything except leave,which loads the next room instead. ill be tweaking my gameloop so it doesnt reload the room everytime soon.
My next step is the addition of mobs. and here ive run into a problem i cant find the answer to with google. My plan was/is to make a class for mobs and instantiate it when there was a mob present and load data from a file. But then i was trying to figure out how to code which room to load them in. First answer was to have the room file dictate which mobs, if any to load. great. except that i want the mobs to stay dead, not reapawn everytime the room reloads. so now im wondering if i should be loading the rooms from file all at the same time before the game loop. Potentially too memory intensive down the line when the game has more rooms and mobs? and what to load them to? i havent used arrays in c++ yet, though i have used map which seems similar. Im not even sure what a vector is. i expect ill be needing to read up on those very soon.
so the basic question is this: leave loading the rooms the eay it is, load them all at the beginning of the game, or something else?
all help is appreciated