   implementing a save() and load() game functions????
  high, ive been thinking about this question for a little bit. now that ive expanded my ascii RPG to be able to play as many levels as maps i can make, ive thought about putting in a save/load game feature. so how does this work exactly? just thiking about it, it seems like it wont be that hard.all i have to do is let the user pause the game during play (or when you first start the game). once at this paused screen, ill give the user the choice to load or save a game. if they pick save, what i would do was take all of the important game data- like health,stamina,mana, x and y position, current level, items they have, ETC. and output all this information to a txt file. then, if they later chose the load option, it would read in each of these variables in from the txt file , and then plug those variables in into the current games data. effectively putting the user in the same "state" as they were in when they saved the game. it seems like this wouldnt be that hard to do, i would just have to make sure to include all the important variables that need to be saved. is this all there is to it? anything i might need to know ahead of time so i dont screw anything up bad? thanks for any help  
  Not quite sure how your game works, but you might need to save weapon states, spell states, enemy states.  Anything of that nature.If you derive all entities from a base class and store all of the entities in the list, why don''t you give the class a ''Save'' function?Then you just loop through the entity list calling the save function.  That way everything thats currently in-game (in your entity list) is saved. ;  Yep, that''s how it works!  Just be sure you put everything, that means EVERYTHING, the game needs to know in order to restore the game to the exact point that it was when the user saved. ;  Normally a game has a game state, a tree structure with all objects in them. Anything that can change needs to be in there. Then when saving or loading it can be easily be rebuilt. ;quote:Original post by graveyard filla  ... and output all this information to a txt file. then, if they later chose the load option, it would read in each of these variables in from the txt file I have found that saving in binary mode is generally easier than saving in text mode.  That is how most (pro) games do it anyway.  Text mode allows users to easily edit the save file... which may or may not be a good thing.I read this article a few days ago.  It may help you.  I do saving and loading in a somewhat similar fashion in my game. James SayerDingo Gameswww.dingogames.comHome of Jack of All Trades