[freeciv-data] Data patches
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I read about the planned data reorganization by Eric S. Raymond.
He wants to replace tile arrays with directories of single sprites, and remove
all spec files.
This isn't bad overall, but it wouldn't be possible anymore to let different
tilesets use the same files. An example:
Trident and Isotrident are using mostly the same graphics, but with different
x_top_left, y_top_left, dx and dy settings. It would be possible with very
little work to rewrite the Trident spec files so that it uses the same
flag/unit arrays as Isotrident, which would mean that e.g. nation
contributors only have to edit one flags.png instead of two.
This would only save some kilobytes, but the main thing is that contibutors
will have much less work in the future.
Another example is the isotrident_shields.tileset patch I'm working on
(PR#3708), which uses the same shields.png as trident_shields.tileset, but
with different specfiles because the tiles don't have the same sizes in
trident and isotrident.
So when you make any changes to the graphics system, make sure this is still
Another problem: It is not possible to use negative x_top_left and y_top_left
settings (the client would show black areas otherwise). So when you split the
flags.png array to multiple small files, make sure you leave transparent
areas (e.g. 64 pixels wide/high) at the top, left, right and bottom of the
image, then set x/y_top_left to 64, instead of making the image 26x20 and
setting the x/y_top_left values to 0.
This makes it possible for tileset designers to use the same files although
they want the flags to appear at another position.
As the files are png-compressed, this wouldn't change the file sizes very
An example on how the offset problem can be solved:
In the .tileset files, make the files list appear as
directory/, x_top_left, y_top_left
"isotrident/units/", "64", "64"
would mean that the tileset should include all images in the isotrident/units/
directory with x- and y-offsets of 64 pixels.
- [freeciv-data] Data patches,
Daniel Herding <=