Re: [Freeciv-Dev] Hex map implementation
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Artur Biesiadowski wrote:
>
> I've started playing with hex map. For now just class in java, generic
> enough it could be used for some wargame if freeciv will not choose
> hexes after all.
>
> I've decided to use vertically flattened hexes. They fit into square - a
> lot simplier to make calculations/repaint etc. Normal hex should have
> proportions of 2 x sqrt(3) and they have just 2 x 2.
>
Aha, well.
Have you thought about using hexes that are numbered in three directions
instead of shifting them ? Shifting is nice for display, but not for
distance calculations.
See here, each tile is numbered with a single digit x,y and w coordinate,
x,y and w always add up to 15.
http://wwwhoppe.math.uni-augsburg.de/~schaefer/hexmap.gif
--
Peter Schäfer - mailto:schaefer@xxxxxx, schaefer@xxxxxx
Support the Campaign to Save Iridium Telecom -
phone Beavis 0049191088888888180332332 for a good time.
(Don't try this anywhere were you leave any evidence.)
|
|