How can I add more views without saved games getting destroyed

Started by Marcel86, Sun 12/04/2020 00:25:25

Previous topic - Next topic

Marcel86

I have an odd, but very frustrating issue during development with AGS, and wonder if this could be solved:

I have several save games. Howevr, each time I add a new view to the game (which is not even used), all
saved games made prior to tat change cannot be loaded anymore.

It only gives me an error "#Error: Unable to restore saved game": Missmatching number of views."

Is there a way to keep those saved game states working during development when new views are added?
Or do I have to start all over againg from the beginning each time I want to test a certain scene of my game?

Cassiebsg

Only way is to create dummy views/images/etc. But you can't account for everything.

You might be better off creating a debug menu/GUI, that lets you jump to where you want to test and sets all variables needed.

Relying on savegames to build the game won't really work.

Use them when you are testing the final build and you are just debugging. Also leave some dummy variables free on the Global variables panel, so you can create new if needed during debugging without the savegame complain.

Good luck with development :)
There are those who believe that life here began out there...

Crimson Wizard

No, there's no way to keep old save states after you added new content. Because of how built-in save system in AGS engine was originally written, it does not know how to deal with mismatching data. I doubt this will change any time soon, at least not with larger engine overhaul.

This is what everyone has to deal with, and in regards to solutions, there are two situations here. First - development, when your games change a lot and fast, and second - updating your game after it was released - this is something you should get prepared for before the release.

For development time it's better to not rely on standard save games at all (at least until your game is mostly done and is ready for beta testing). The best way is to do what Cassiebsg suggested above. Script a checkpoint system that would teleport you to certain stage in game, setting up everything as if you followed all the way there from the start. Of course, you need to think this through, but if done right it may work very well.

For release time, there's this known workaround, which is pretty ugly but working, and AFAIK even commercial game devs used it with AGS: you create a number of dummy objects of all kinds in your game (like 10 characters, 10 views, 10 GUIs etc), that you may use later if you need to do a fix or some minor update while keeping your players' saves intact.

Finally, this problem may be resolved completely by writing your own save system. Whether this suits your game or easy to do, it depends... Built-in save system writes down everything, even things that may not be important at all times, like music playback position. Maybe your game does not need this, and you can live with more like a "checkpoint" kind of save system that saves only puzzle states and rearranges things upon load based on that simplier data.

Laura Hunt

Quote from: Cassiebsg on Sun 12/04/2020 00:56:01
You might be better off creating a debug menu/GUI, that lets you jump to where you want to test and sets all variables needed.

Seconded. I do this all the time when I want to test advanced stages of my game, it's a great solution.

SMF spam blocked by CleanTalk