About Restoring/Loading old saved games

Started by edmundito, Mon 28/03/2005 07:22:08

Previous topic - Next topic

edmundito

I remember when if you had a newer version of a game and you were trying to load an old saved game, if the new version had changes to the global script, it would not load the game. However, as I'm working on my game I realized that this is no longer the case. I tried searching the changes file, but I couldn't find anything that would say that this was ever changed.

My question is... when did this happen? I'm glad that I can tweak the global script and still load an old game, but I'm curious to know.

RickJ

Yeah, I'm wondering about this too, regarding the RunAGSGame() feature.  What happens when you load a save slot that was saved from the other game?   

Kinoko

I noticed that too. After awhile of constantly changing the global script and loading the same save game slot, I realised I couldn't have done this a few months ago.

Radiant

Quote from: RickJ on Tue 29/03/2005 01:09:05
Yeah, I'm wondering about this too, regarding the RunAGSGame() feature.  What happens when you load a save slot that was saved from the other game?   
I think you get an error, 'invalid save game' and that your game crashes.

Gilbert

Well, there's a manual, why didn't you check it out first?

Extracted from description of RunAGSGame():
QuoteThe save game slots are shared between the two games, and if you load a save slot that was saved in the other game, it will automatically be loaded.
But since RunAGSGame() wasn't used that much (and I won't use it anyway), I'm not sure if it's really working (well the last game I played using this feature was RR4, which seemed to work okay, that game had lotsa crashes though. := )

I'm not quite sure, but from the description I think the engine handle it this way: When a game's saved, the current game's name's also saved into the file, so when you restore a game the engine first checks if the saved name in the saveslot matches the current game, if not, it'll try to find another game with that saved name to execute.

About Netmonkey's original question, I'm not sure about it either, but I think it's related to some critical changes in your game, for example if you add/change/remove some variables it probably changes some kind of listings in the game, and the game may exit if the engine finds the variable listings don't match with the one in the savegame.
For end-users who download a game and play they should only play one (completed) version of the game, so it's not a big problem to them. However, for a creator, it's still advisible that he deleted teh old save games before testing an updated version of his game, so to prevent strange bugs to pass during tests.

Pumaman

Nothing has changed, if the size of the global script data segment changes, you cannot load a saved game. That means if you add or remove global variables from the script you should find that old save games will no longer load.

Even if it appears to work I'd always be very cautious about using a save game if you've made changes to the script, since the save game may not reflect the true state of the game at that point.

RickJ

Quote from: Gilbot
Well, there's a manual, why didn't you check it out first?

Extracted from description of RunAGSGame():
QuoteThe save game slots are shared between the two games, and if you load a save slot that was saved in the other game, it will automatically be loaded.
But since RunAGSGame() wasn't used that much (and I won't use it anyway), I'm not sure if it's really working (well the last game I played using this feature was RR4, which seemed to work okay, that game had lotsa crashes though. := )
[quote autor=Pumaman]
Nothing has changed, if the size of the global script data segment changes, you cannot load a saved game. That means if you add or remove global variables from the script you should find that old save games will no longer load.
Quote
When I read the manual it wasn't at all clear what actually happens.   The behaviour most of us have observed and  CJ's explanation seem to be at odds with what the manual says about two or more different games sharing the same save slot(s).   The situation is still not clear and some clarification would be gretly apprreciated.  Thanks.






Pumaman

I think we're talking at cross-purposes here. There's two seperate issues:

1. A normal game (no RunAGSGames or anything) -- if you test it, then save the game, then quit back to the editor, add some stuff to the global script, test it again and try to restore your save game, it will fail.

2. RunAGSGame; Save slots are shared between the games, yes. The save game contains information as to which game file was active at the time, and it should then be restored and continue from there.

SMF spam blocked by CleanTalk