Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] Re: Graphic resource editor, and an architecture proposal
Home

[Freeciv-Dev] Re: Graphic resource editor, and an architecture proposal

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Graphic resource editor, and an architecture proposal
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sun, 12 Jan 2003 14:43:32 +0000 (GMT)

On Fri, 10 Jan 2003, Eric S. Raymond wrote:
> As promised, I have written a resource editor for flags, shields, and 
> graphics.
> A copy of the 0.1 version is enclosed with this note.

I don't see any attachments...

> <para>The FreeCiv's server's startup parsing has an interesting
> feature which creates something of a conflict between two of Unix's
> design rules, and is therefore worth closer examination.
> The server ignores property names it doesn't know how to use.</para>

Well, yes, but you can show such warnings if you use the "--debug 3" (or
4) parameter.

Then you'd get a warning like this for each file, with a list of all
unused entries in it:

        3: Unused entries in file data/default/units.ruleset:
        3:   unused entry: something.here

Previously, we used to show these warnings by default (at least for
savegames) but I remember writing a patch to hide them by default since
slightly older savegames output too many confusing (and most of the time,
competely irrelevant) warnings.

This should have been documented somewhere, though. Perhaps someone should
write a general modpack README.

> <para>The aggregate of all FreeCiv data files is functionally similar
> to a Windows registry, and even uses a syntax resembling the textual
> portions of registries.But the creep and corruption problems we
> noted with the Windows registry don't crop up here because no program
> (either within or outside the FreeCiv suite)
> <emphasis>writes</emphasis> to these files.It's a read-only
> registry edited only by the game's maintainers.</para>

I don't know if that is relevant, but savegames are also registry files,
and they are written by freeciv.

> <para>The performance impact of data file parsing is minimized because
> this operation is performed only once, at server startup time.</para>

Writing savegames is a time-consuming operation. I don't know how much the
registry format is to blame for that, however.

> FIRST PROPOSED CHANGE: Replace the tile-array files with directories,
> one for each array, with the tiles as named files beneath them. Nuke
> all the tile-coordinate crap in the specfiles.

I agree. This would make it a lot easier to add stuff.

> SECOND PROPOSED CHANGE: Consolidate all the tileset-specific graphics
> into one directory called 'graphics'. All image lookup calls dive
> into this directory. Hierarchy beneath it goes
> <role>/<type>/<size>/<style>.
...
> 2. Looking up a flag by nation and preferred size: ("flag", "usa",
> "30x30", "engels"). Look under graphics/flag/usa.  See that there
> are two directories,26x20 and 30x21.Aha!  That's a size.  By
> least-squares metric the closest match is 30x21.Look for "usa"
> under there. See a file.  Return it.

Don't agree. I think it makes more sense to standardize on a certain size,
at least for flags and misc images.

  - Per

PS It is spelled "Freeciv", not "FreeCiv"...



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