Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] (PR#8487) RFC: hex tilesets
Home

[Freeciv-Dev] (PR#8487) RFC: hex tilesets

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#8487) RFC: hex tilesets
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 12 Apr 2004 14:12:39 -0700
Reply-to: rt@xxxxxxxxxxx

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

> [andrearo@xxxxxxxxxxxx - Sun Apr 11 20:04:17 2004]:

> What dimensions should the normal hex tiles be?
> Maybe I can update isophex to the latest CVS code, and include hex tiles
> in it also.

Hmm.  All I can really say is that they should be as close to a circle
as possible.

Currently your tileset has

  hex_width = 16
  hex_slope_width = 16
  hex_height = 0
  hex_slope_height = 16

giving an actual tile size of

  width = hex_width + 2 * hex_slope_width = 48
  height = 2 * hex_slope_height = 48

but giving tile tilespec sizes of

  NORMAL_TILE_WIDTH = width + hex_width = 64
  NORMAL_TILE_HEIGHT = 32

this is a bit counter-intuitive since the tileset actually specifies the
latter values rather than the former; each tile actually only covers a
48x32 area (this is basically a circle on most monitors).

If you reversed the process you'd end up with a 32x48 area; bad.  To
keep the same tile with a reversed you'd need

  NORMAL_TILE_WIDTH = 48
  NORMAL_TILE_HEIGHT = 32 + hex_height

where hex_height is the height of the left and right hex sides.  It
should probably be 12 or 16.

A good way to test this would be to get the code running.  Then you
could edit the top-level tilespec values and see how the hexagon looked
(in the map grid) without actually making any new tiles.

jason



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