I am coding lodu game in c++ and I want to know how to create a save file for my game, so that a user can play, and then come back later. Any idea how this is done
|
|
First things first, you must figure out what do you want to save, ie, what part of the game state. Common suspects are:
What is not to be saved in the save file are things like level info, which should be loaded off separate files that don't need to be changed, or general static info that doesn't change. To do this in C++, I suggest that you take a look at how filo I/O is done: http://www.cplusplus.com/doc/tutorial/files/. I suggest that you also use Json: http://jsoncpp.sourceforge.net/. Once you tell us the actual problems you have, we will be able to provide more concrete answers. |
||||
|
|