Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] (PR#10734) SVG flags
Home

[Freeciv-Dev] (PR#10734) SVG flags

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#10734) SVG flags
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 25 Oct 2004 19:08:47 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10734 >

The worms tileset uses SVG (scalable vector graphics, a 2d vector 
drawing file format).  This allows the tileset to be rendered (at 
compile time, basically) in any dimensions.  So you can have a 64x32 
tileset, a 128x64 tileset, etc., all from the same sources.  Sodipodi 
and inkscape are Free SVG editors.

Some animations have been done using blender.  Blender is a Free 3d 
modelling and rendering system.  It is extremely powerful but also 
rather complicated.  However it also has the ability to do rendering in 
any dimensions.

This is a very powerful concept which we should take advantage of.  I 
propose that we start by doing this in a very simple way: by using SVG 
for our flags.

It is possible to convert a PNG image to a SVG file.  Per referred me to 
potrace.  Unfortunately this is only does monochrome.  Then I found 
autotrace.  This does color images and can probably be of use in the 
future.  I tried autotracing some of the flags.  However since the 
resolution is so low this gave mixed results.

Then it occurred to me that surely I am not the first to try this.  (If 
I were a smarter person this would surely have occurred to me 
immediately.)  So after 30 seconds of searching I found

   http://www.sodipodi.com/index.php3?section=clipart/flags

which includes 376 national flags in svg format, in the public domain. 
I believe that we can take these, relicence them under the GPL, and use 
them directly in Freeciv.

-----

So, my idea is this: we collect a complete collection of SVG files, one 
for each flag (for flags that have no SVG available, we can use 
autotrace rendering or take the flags from the worms tileset).

We can set up the bootstrap to automatically render these into PNG files 
of the desired resolution at compile time.  This should work about like 
generate_packets.py does now: the .png files can still be kept in CVS, 
but are re-rendered when the SVG file changes.

The short-term advantage of this is that we can render them at build 
time into other resolutions.  This should make it easy to maintain the 
flags in tinydent, for instance, and will allow better flags in larger 
tilesets like bigisotrident.

In the longer term we may be able to use SVG directly within freeciv. 
We already scale the flags down to be used in the nation selection 
screen.  And Per has had ideas of storing the FTWL theme graphics in 
SVG.  Flags are a good place to start here.

jason




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#10734) SVG flags, Jason Short <=