Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] Re: non-existent technologies
Home

[Freeciv-Dev] Re: non-existent technologies

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: non-existent technologies
From: Jason Dorje Short <vze49r5w@xxxxxxxxxxx>
Date: Sat, 01 Feb 2003 00:29:35 -0500
Reply-to: jdorje@xxxxxxxxxxxxxxxxxxxxx

Eric S. Raymond wrote:
Jason Dorje Short <vze49r5w@xxxxxxxxxxx>:

There are all sorts of other unnecessary ruleset dependencies in the savegames, for instance units are stored by ID rather than by name. This can be improved on greatly by avoiding using an "index" when a name can be used instead. But it will still break if a unit is removed, for instance. To get full compatability either a capstring is needed to match ruleset and savegame, or the savegame should store all needed inforamation about the ruleset it was originally played with.


I am in favor of any move away from magic numbers to readable tokens.
The marginal extra space cost of storage and the marginal time cost of name
lookup are well worth paying, IMO, in order to have a save format that is more
robust and more transparent to inspection.

Storing the name of a unit/technology instead of a number of bitstring only takes up marginally more space, and it allows you to renumber the units/technologies without bad results. But it is not always a good thing: although you can reorder things all you want, if you rename a unit but leave it otherwise identical you will end up incompatible, whereas the old system would leave you compatible.

Storing the "entire" ruleset is a lot of work. But it might be possible to store just enough so that a changed ruleset will leave a game still playable. To begin with, you don't need to store any information about nations - if the player's nation isn't present they can just be assigned to a different one without any overly bad results. The question is: what _would_ you need to store?

Storing a capstring is helpful, but ultimately all it can do is tell you you're screwed (rather than letting you find out for yourself). Unless you can download the original ruleset and replace the one you have with it (remember the names must match, as of right now), the savegame still isn't usable.

The alternative is to break savefile compatability for the 'main' freeciv game any time the default ruleset is changed too much. It seems likely this has happened already - although we haven't changed "savefile compatability" in years, I have heard only bad stories from people trying to load old games in new versions of freeciv.

My conclusion is that none of the above ideas is fully satisfactory. One thing we certainly can do, though, is keep these problems in mind when we change the rulesets. And realize that problems like this will become worse as gen-effects moves along.

jason



[Prev in Thread] Current Thread [Next in Thread]