barryg613 / uqm-hd

Automatically exported from code.google.com/p/uqm-hd
0 stars 0 forks source link

Handling the error message for old savegames #140

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am wondering if it would be possible to at least track the error when 
attempting to use an old incompatible save game?
With the official release I am browsing on different forums and I notice many 
people are wondering about continuing old savegames - so the game will crash 
for them. Bad. If it's going to crash, at least it show a properly formatted 
message, saying the old savegames are not compatible.

Perhaps one way to do this would be to do measure the savegame length and not 
even show savegames that do not match the proper length.
That way, incompatible save games wouldn't even show.
Of course, it would be even better if one could load an old savegame and the 
code could ignore the missing bits with the quasispace coordinate when the 
length indicates an old savegame.

Original issue reported on code.google.com by Awakened...@gmail.com on 2 Jan 2013 at 1:53

GoogleCodeExporter commented 8 years ago
I have added a warning message which is displayed when viewing a savegame in 
the save/load screen that might be incompatible.

Since the length of savegames varies according to how many ships are after you 
in hyperspace / how many ships are in the current solar system, which races are 
alive etc. etc. there is no surefire way of telling the validity of a save from 
the filesize.

I've added an identifier into the new saves which lets the game know it is from 
uqm-hd (and also contains a savegame name - the saves can be named now!).

However, it doesn't help in detecting whether a save is from vanilla UQM or the 
alpha. There is no easy way of telling Alpha save from vanilla UQM save: the 
game-state bits (which include the QS bits) are in the middle of the savegame 
file. After the gamestates there's the information about current alien races, 
other ships in HS etc right after it - no spaces, no identifiers, nothing at 
all which would help one tell where the gamestates end and where the race 
information begins.

So until a way to properly tell the gamestates' length in a savegame nothing 
better can be done except showing that warning message.

Original comment by Jaakko.M...@gmail.com on 10 Jan 2013 at 4:07