Bacon&Onions
Member
Whenever I add a new level to my game I dread doing so because my save system is so convoluted. I'm sure there must be a better way than just creating a different variable for every single I save, but never bothered until it gradually became a problem.
Now I'm about to add 30 new levels on top of the existing 30 levels in my game and I want to rewrite my save system otherwise I'll have 60 lines of stuff like this:
ini_write_real("Scores", "PScore", global.scorePdisp ); //score
ini_write_real("Scores", "PScoreH", global.scorePdispH ); //hard mode score
ini_write_real("ScoresK", "KPScore", global.scorePdispK ); //keyboard?
ini_write_real("ScoresP", "PPScore", global.scorePdispP ); //Pasifist?
ini_write_real("ScoresT", "TPScore", global.scorePdispT ); //Time
ini_write_real("ScoresT", "THPScore", global.scorePdispTH ); //Time Hard
in the save screen, load screen, and everywhere else in the game that uses this data.
JSON is the first thing I find when googling ,it looks good to me.
Before I undergo cleaning up all this code I was wondering-
What do you think is the best way to manage save system?
Is there a flat out best way or do you uses different systems based on the needs of your game?
Now I'm about to add 30 new levels on top of the existing 30 levels in my game and I want to rewrite my save system otherwise I'll have 60 lines of stuff like this:
ini_write_real("Scores", "PScore", global.scorePdisp ); //score
ini_write_real("Scores", "PScoreH", global.scorePdispH ); //hard mode score
ini_write_real("ScoresK", "KPScore", global.scorePdispK ); //keyboard?
ini_write_real("ScoresP", "PPScore", global.scorePdispP ); //Pasifist?
ini_write_real("ScoresT", "TPScore", global.scorePdispT ); //Time
ini_write_real("ScoresT", "THPScore", global.scorePdispTH ); //Time Hard
in the save screen, load screen, and everywhere else in the game that uses this data.
JSON is the first thing I find when googling ,it looks good to me.
Before I undergo cleaning up all this code I was wondering-
What do you think is the best way to manage save system?
Is there a flat out best way or do you uses different systems based on the needs of your game?