Savegame compatibility?

Started by strazer, Thu 29/01/2004 01:59:14

Previous topic - Next topic

strazer

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?

Rui 'Trovatore' Pires

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.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

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.

Scorpiorus

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

SMF spam blocked by CleanTalk