Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: rmonic79 on Thu 31/03/2016 10:50:18

Title: Update savegame [Solved]
Post by: rmonic79 on Thu 31/03/2016 10:50:18
Hi guys, we have a big problem, if you change something in the code you are not allowed to restore a savegame made before. Our game will be out on steam and we would like to make an update after release without invalidate the savedata of the players. Is it possible?
Title: Re: Update savegame
Post by: Khris on Thu 31/03/2016 14:43:15
It depends on the change you make. Adding a variable will break the old savegames, but fixing typos wont, afaik.

The only way to work around this is to implement a completely custom savegame system, which isn't feasible for a standard adventure game that relies on AGS's internal mechanisms.
Title: Re: Update savegame
Post by: rmonic79 on Fri 01/04/2016 10:27:07
Sadly we are not skilled enough to do something like this :(
But if you have any suggestion to prepare the code to receive some updates without invalidate savegame ?
(for example we're preparing the code for potential future translations to have only to change the graphic buttons)
It could be useful to prepare some unused variable for example?
Title: Re: Update savegame
Post by: Crimson Wizard on Fri 01/04/2016 14:03:55
Unused variables could actually be a way to go.

AGS does not identify distinct global variables when it saves/load script data in game, so following should work same way:

Game version 1:
Code (ags) Select

int DummyArray[1000];

Game version 2:
Code (ags) Select

int NewVariable;
int DummyArray[999];


Same should be true for other game items, such as characters etc.

But ofcourse you better test if this works while you still have time.
Title: Re: Update savegame [Solved]
Post by: rmonic79 on Fri 08/04/2016 09:12:17
thanks! :)
Title: Re: Update savegame [Solved]
Post by: Dave Gilbert on Sat 09/04/2016 19:58:30
This is one of our biggest issues with AGS and is the main reason why we don't update our games as often as we'd like. :(

The main rule of thumb is to change script in ASC files *only*. Changing script is usually safe. Adding or changing graphics is not. As the others suggest, I'd create about a dozen or so dummy global variables of every type before you launch. That way if you need a global variable later, you can use it.

There are other tricks, like reading graphics from external files instead of importing them into the editor. Try and avoid that if you can!

If you do make an update, keep a few savegames from the previous version handy so you can test that they still work.

Good luck!

-Dave
Title: Re: Update savegame [Solved]
Post by: rmonic79 on Wed 13/04/2016 10:07:57
Thanks to all of you guys ;)