Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2002:
[Freeciv-Dev] Re: [Patch] Cleanup of scorelog generation/new scorelog fo
Home

[Freeciv-Dev] Re: [Patch] Cleanup of scorelog generation/new scorelog fo

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [Patch] Cleanup of scorelog generation/new scorelog format (PR#1967)
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Tue, 27 Aug 2002 19:50:59 +0200

On Tue, Aug 27, 2002 at 07:18:02PM +0200, Reinier Post wrote:
> On Fri, Aug 23, 2002 at 12:33:30PM -0700, Raimar Falke wrote:
> > 
> > The attached fixes three know problems of the scorelog format:
> >  - there is no way to add players during a game
> >  - there is no way to match a scorelog to a savegame
> >  - the format uses years instead of turns
> 
> Just looking at the code, this looks like a vast improvement.
> Questions:
> 
>   - isn't it better to put the comment text in a separate file,
>     perhaps in data/ ?
>     that way, it's easier to add translation, I think

I didn't indent to translate it. I just found the idea nice that a
file documents itself. We can move it to data/ or doc/ but I'm not
sure if people will find it there. I nice idea is that we put a URL in
the file for a reference of the format and let it point to some lxr
file.

>   - do you still match by year in a savegame?

All stuff is references by turn.

>   - the "data" keyword seems superfluous to me, it makes the file
>     much bigger - 

>     generally speaking the format is very redundant;

Yes. It has the advantage that you don't need to have context during
the parsing. Like in the old format. All info is in that line. You can
do a "grep '^addplayer'|something" and don't loose any information.

>     for people with small disks it may be better do be a little more
>     space efficient

We can gzip the file after the game has ended.

>   - I'd prefer "player" to "addplayer": that would still be correct
>     if player renaming is ever implemented

"addplayer" is symetric to "delplayer". If we can renaming I'm for
adding a "ren(ame)player".

> [...]
> >    turn 1 -3951 3951 v.Chr.
> 
> What kind of calendar code does this assume?

The one used by the code?!
>  Should it even be in?

Payciv has years so have we. It is just decoration.

> (The "human readable" year name is locale specific.)

Yes. Depending on the tools which use it we can add something like
 numeric_turn_unit year years

Which is the singular and plural form of the unit used by the numeric
argument ("-3951" above). In a more complex calendar I think we should
stick to turns so that this lines becomes:
  turn 1 1 Day 45 of the year 678 after Karl in the second Age

But this also depend on the tool-requirements.

> It would be nice to have a standalone sav2scorelog utility distributed
> with the code.

You mean a set of saves (generate with saveturns=1) are read in and a
scorelog is produced? If yes: why? You can just enable the scorelog in
the first place.

> > About the patch: pretty straightforward. Note that I have removed the
> > ability to read the old scorelogs.
> 
> In that case we must provide a conversion script.

Why? It only matters if the server appends to a scorelog. And who I
ask you 
 - playes with scorelog, 
 - keeps scorelog and savegames in sync,
 - interrupts the gameplay and 
 - started the game with the old server and continues it with the new
 one? 

I think that this number is 0 (zero).

> > To show that this isn't a paper project I have update civlog
> > (http://sourceforge.net/projects/civlog/) (version 0.6.3 to be
> > precise) to also read the new format. The modified version is
> > available at
> > ftp://ftp.freeciv.org/freeciv/incoming/civlog-0.6.3-mod.tar.gz. If the
> > patch is included in the freeciv tree I will release a new version
> > 0.6.4 of civlog.
> 
> I will test this.

Good.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "We just typed make..."
    -- Stephen Lambrigh, Director of Server Product Marketing at Informix,
                         about porting their Database to Linux


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