Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: strazer on Thu 29/01/2004 01:59:14

Title: Savegame compatibility?
Post by: strazer on Thu 29/01/2004 01:59:14
When I first discovered AGS I was surprised how easy it is to save and restore a game.
Are all current values stored "manually" or is it just a memory dump?

The reason I ask is because, how do I know savegames from an older version of my game won't work with a revised version (other than testing :) )?
Is there anything in particular you should avoid doing?
Title: Re:Savegame compatibility?
Post by: Rui 'Trovatore' Pires on Thu 29/01/2004 06:20:29
Well, from my experience I can tell you right now that anything that changes the global script makes the old savegames unusable. Changing room scripts, on the other hand, is not a problem, since they're only processed independently. I imagine there may be problems if your "Restore Game" put you in a changed room, but other tha  that...

...but you probably knew all of this. Oh well, you asked, and here's my answer.
Title: Re:Savegame compatibility?
Post by: Pumaman on Sat 31/01/2004 14:32:10
How the saves are stored is complicated, but you could look at is as basically being a memory dump.

What this means is that if you add any new variables to your scripts, old save games won't work. This is because the save game has a memory dump of say 15 variables, so it cannot load this into the new memory space for 16 variables.

Sometimes save games from a different version will appear to load correctly, but you're better off starting again if you change things in the game.

For example, the interactions are saved into the save game - so if you add a new command to an interaction, then load your save game and test it, it won't work - because the old version of the interaction is saved in the save game file.

So in summary, if you change anything more than graphics or minor script tweaks, you shouldn't rely on your saves working.
Title: Re:Savegame compatibility?
Post by: Scorpiorus on Tue 17/02/2004 20:00:57
So, maybe put a version checking when a savegame is being loaded? Say a game has some personal version ID (ex: "gamename" + build version) which is saved along with all the data into a savefile and then compared with on loading. :P