Complete.Org: Mailing Lists: Archives: freeciv-dev: February 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: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Cc: Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>, "Eric S. Raymond" <esr@xxxxxxxxxxx>, jdorje@xxxxxxxxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: non-existent technologies
From: Ross Wetmore <rwetmore@xxxxxxxxxxxx>
Date: Sun, 02 Feb 2003 21:55:16 -0500

If you are going to save ruleset data, then recognize that it never
changes throughout the duration of the game. Thus you need only to
store it once (possibly in an associated file).

But if you keep it separate then users have to remember to save both.

This then comes down to whether the user can zip up the ruleset
directory more efficiently than the program, and remember to put
the two pieces away together. If you think they can ignore the
problem.

An alternative might be to only save the rulesets with the first
savegame (and maybe with the final one). This means you need to
add the one line of code to do a savegame before entering the
real main loop, IMHO an existing bug, (and after exitting it).

Cheers,
RossW
=====

Raimar Falke wrote:
On Fri, Jan 31, 2003 at 10:18:42PM -0600, Mike Kaufman wrote:

On Fri, Jan 31, 2003 at 08:22:17PM -0500, 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


this is crap. marginal? I think not. you're talking about adding
something like 150k to each savegame (to store ruleset info). This
is ludicrous. We already store the name of the ruleset that was used
to save the game. That should be good enough. What happens if I
don't happen to have the same ruleset that the savegame was saved
with? Should it simply refuse to load, or should it try the best it
can? Even with a system that stores names rather than index, you're
still screwed if you change the rulesets too much anyway. If you
don't include all the ruleset data, then this is almost a worthless
change, and including all the ruleset data is far too expensive.


I agree. A safe solution either needs to save all the ruleset data or
a hash/fingerprint of all (used) ruleset data. The latter may be
possible looking at the frequency of changes of the ruleset.

        Raimar




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