Accounts e-mail HP

Scaling a Tileset

Contribute, display and discuss art and tilesets for use in Freeciv here.

Scaling a Tileset

Postby Guest » Thu Aug 19, 2010 10:22 am

If I want to scale an existing tileset (specifically, enlarge a hex tileset), apart from adjusting the image sizes, which values should I change in all the .spec files and which ones should I leave as is?
Will having the new definition in the data directory be enough?
Guest
 

Scaling a Tileset

Postby Guest » Mon Aug 30, 2010 11:57 am

To scale a tileset you must:
1) Copy the original tileset directory to a new directory.
2) Scale the graphics.
3) Modify all the .spec files in your new tileset directory to math your graphics files (hint: variables x_top_left, y_top_left, dx and dy).
4) Create a copy of the tileset definition (create a copy of the corresponding .tileset file).
5) In the .tileset file change the values of the following variables to match the size of your tile set; normal_tile_width, normal_tile_height, small_tile_width and small_tile_height.
6) In the .tileset file change the values of the following variables to adjust the city and unit position; unit_flag_offset_x, unit_flag_offset_y, city_flag_offset_x, city_flag_offset_y, unit_offset_x, unit_offset_y and citybar_offset_y.
7) In the .tileset file you can also change the fonts if necessary.

I think that is all.

I recommend you that if you change the width/heigth relation in a hex tileset disable the terrain blend in the .tileset file (for adjacent terrains) because sometimes the terrain blend is not between the correct tiles (some months ago I was experimenting with a new hex tileset for Freeciv 2.1 with double width and same heigth of the original).
Guest
 

Scaling a Tileset

Postby HanduMan » Mon Aug 30, 2010 12:38 pm

[quote="Anonymous"]I recommend you that if you change the width/heigth relation in a hex tileset disable the terrain blend in the .tileset file (for adjacent terrains) because sometimes the terrain blend is not between the correct tiles (some months ago I was experimenting with a new hex tileset for Freeciv 2.1 with double width and same heigth of the original).[/quote]
I assume that with "terrain blend" you are referring to the dithering thingy which is used as a pattern to mix adjacent terrains with each other a little bit. The changing of tile proportions did not brake that, it just made the flaw more visible. Freeciv just cannot do the dithering on (iso)hex tiles correctly. The vertical (in hex) and horizontal (iso-hex) boundaries get messed up with the terrains directly up and down (hex) or left and right (iso-hex) to the vertical/horizontal side of the hexagon.

I should really file a bug report about this if I could explain it properly...
HanduMan
 

Scaling a Tileset

Postby Guest » Tue Aug 31, 2010 5:26 am

Yes, you say it better than me. I also think that is difficult to explain, but when using 96x32 hex tiles (with a 64x32 hexagon) I see that the mixed of adjacent tiles is one tile out of its position. A similar problem occur with the use of corner sprite_type on water tiles.

A workaround that works for me was setting is_blended = 0, num_layers = 1 and comment out the layer0_sprite_type = "corner" line, i.e. decide only use full size tiles (I use is_blended = 1 only for forest and mountains). With this changes I returned to use 64x32 tiles (as a rectangular grid) but I extend the horizontal size of the hexagon to 64 pixels to use all the tile space, i.e. a 64x32 hexagon (top = bottom = 32 pixels; other sides 16 pixels each).

The result was good, but there is a lot of work to make all the necessary tiles, I can say that is a work on progress, but very slowly (I am not an artist).
Guest
 

Scaling a Tileset

Postby HanduMan » Tue Aug 31, 2010 8:20 am

[quote="Anonymous"]A similar problem occur with the use of corner sprite_type on water tiles.[/quote]
Are you sure the map was generated using a topology matching with tile shape? If the topology is wrong then parts of coastlines will be missing.
HanduMan
 

Scaling a Tileset

Postby Guest » Mon Sep 06, 2010 4:47 pm

Yes, I tried with different topologies to be sure I was using the correct one.
Guest
 


Return to Art and tilesets

Who is online

Users browsing this forum: No registered users and 2 guests

cron