How do i make sure an update to the game wont break someones save game

how do i make sure an update to the game wont break someones save game if i distribute the game through google play?

Don’t change the game save structure. If you change the way the data is saved it’ll render the old save games useless, unless you cater for it in the events.

any tips on the “best” way to do a game save structure? I feel the information on save games is really limited and usually just for saving 1 items x,y position or something like that, would be interesting to see how people using Gdev5 handle it with larger games.

@MrMen wanted to say if, in this version, you are saving a player’s position in xpos then don’t start saving and loading the player’s position in ypos in the next version

It all depends on what information you want to persist. Different games have different save data, but aim for the minimum data that needed for the next time the game is played. Say like high score, current playing level, current playing position, highest level open, player health etc.

I would recommend, to make things simpler, to store all the data as children of a structure variable. Then you just need to save the one variable (converted to JSON), and loading it back will be two event actions.

got an example of this? would be nice to see it in action to get what you mean

Like this:


To save, convert the GameSave varaible to JSON and write it out:

image


To load, read the data in, convert from JSON and assign it to GameSave:

image

2 Likes

Thank you that looks great! appreciate it a lot!