[Freeciv-Dev] Re: scorelog/savegame inconsistencies
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, 30 Jul 2001, Justin Moore wrote:
> the civscore.log? And what about the times where you want to transfer the
> savegame file around? Or you got your ass kicked when AI player X jumped
> you and you'd like to try from 100 years ago? I'm just saying that it
Couldn't you take the score log, truncate it at the year you are starting over
from, and then append the score data to that?
> > This comes at the expense of grow memory use, by keeping the while
> > civscore.log info in memory, and disk use, by growing the savegames
> > with it. The increase in size can be estimated by comparing the
> > relative size of compressed savegames and scorelogs.
>
> The increase in memory is:
> num_players * num_tags * num_turns * sizeof(int)
>
> Worst-case = 30 * 27 * 3500 * 4 = 10.8 MB, but that goes until 5000 AD
When you're talking about using a handheld device, stuff like this matters.
It's also just wrong to save a large amount of data in memory that is never
used except to write it back out to disk.
> Likewise, a 30-player AI that ran 280 turns has a scorelog of 2866 Kb
> and a savegame of 74.65 Kb. And that's with my (kludgey) saving routine.
But think about auto saving every turn. Each time you save you also write out
another copy of the score log that includes a copy of all the data from the
previous turn. The size of the score data grows at O(turns^2) instead of
O(turns).
[Freeciv-Dev] Re: scorelog/savegame inconsistencies, Thue Janus Kristensen, 2001/07/29
|
|