0
How to save a progress of a game made in c++
like to resume to a leftover game
4 Answers
+ 3
it depends on the complexity of the game, but you should essentially save the current values of all the relevant variables to a file (you can go for the easy solution and create a dictionary like in xml :p), and write a function to insert all those values back into the program when you 'load' your previous play in the game.
+ 1
A simple text/ json is indeed simple solution. But user can cheat by edit this file. I think that adding a signature that authenticate that the data was written by the program is nice to have feature.
0
but how
0
json makes things easier here... take a look at some github c++ json parser (i have written one too...)