Check to see if a savefile is compatible before loading (and crashing)?

Started by Dave Gilbert, Wed 16/10/2024 15:35:13

Previous topic - Next topic

Dave Gilbert

Dunno if this is an editor thing, or an engine thing. Apologies if this is in the wrong place.

A much bemoaned problem with AGS is the lack of save compatibility between updates. We've gotten pretty savvy about future-proofing out games to avoid most of the pitfalls, but for my current game Old skies there's one scenerio where it's unavoidable. The demo version of the game was set to put its savefiles in the same folder as the main game. So I envision a number of players loading up their demo saves, getting a crash, and getting annoyed. I know hindsight, 20/20, etc but I need to figure out a way to deal with or miitgate that.

Is there a way to check if a savefile is compatible BEFORE it loads and inevitably crashes? That way I can just display a "Demo savefile not compatible with the retail version Old Skies." message and the game won't crash.

Thanks in advance!

-Dave

eri0o

There is a proposal from CW here: https://github.com/adventuregamestudio/ags/pull/2489

I think it's intended for 3.6.2. and you would be interested to take a look because it would be relevant for already released games.

Quote from: Dave Gilbert on Wed 16/10/2024 15:35:13The demo version of the game was set to put its savefiles in the same folder as the main game.

For this specific one time thing, isn't possible to put a new dir name for the new release? Something like "WadjetEye.OldSkies", it would even help to sort save dirs by name and seeing all Wadjet Eye games. Or leave everyone confused and name the dir TheOldSkies.

Ah, another alternative would be to do something in Steam itself, like run a script that checks if OldSkiesDemo dir exists or not and if not, if the OldSkies dir exists, rename it to OldSkiesDemo. Needs to written separately per platform the game exists. This would make the saves disappear to a different did if the person has not run OldSkies demo, and run it, uninstall and reinstall it. I don't know how this would work with the Cloud Saves though, I would ask @Dualnames to test this if it's possible.

Crimson Wizard

I've opened a forum thread for the solution that I'm currently trying out:
https://www.adventuregamestudio.co.uk/forums/engine-development/load-older-game-saves-into-updated-game-attempt-2/
As been said, this is meant to be added to 3.6.2.

Unfortunately, there have been near zero feedback, and, it looks like nobody tried whether it does what is wanted from such feature.

Other than that
- Change save folder name, and/or
- Change save file extension (this adds a postfix to the save file names)
may cut off older saves from being used in your game. This may be done in General Settings -> Saved Games category.

Dave Gilbert

Ah. I'm hesitant to upgrade to 3.6.2 because it's still listed as an alpha/WIP and we're super close to a gold candidate. A new save directory is probably the right move, in the meantime.

Crimson Wizard

Quote from: Dave Gilbert on Wed 16/10/2024 18:54:42A new save directory is probably the right move, in the meantime.

I added this a bit later to my reply, but you also may change save file extension, this may prevent a case when user copies old save to the new folder too.

Crimson Wizard

I would also very much like to hear what would be the preferred engine's behavior. In your question you said

QuoteIs there a way to check if a savefile is compatible BEFORE it loads and inevitably crashes? That way I can just display a "Demo savefile not compatible with the retail version Old Skies." message and the game won't crash.

Do you suggest a behavior that preloads some data from a save, displays that it is not compatible, and then proceeds from the point where it has been before player clicked on "Load"?

Because that's not possible currently, and it is not immediately clear how this may be achieved. If that's a desired behavior, then it has to be discussed and preplanned.

SMF spam blocked by CleanTalk