Complete.Org: Mailing Lists: Archives: freeciv-dev: August 1999:
Re: [Freeciv-Dev] Hex map implementation
Home

Re: [Freeciv-Dev] Hex map implementation

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Artur Biesiadowski <abies@xxxxxxxxx>
Cc: Freeciv Dev <freeciv-dev@xxxxxxxxxxxx>
Subject: Re: [Freeciv-Dev] Hex map implementation
From: Peter Schaefer <schaefer@xxxxxx>
Date: Wed, 18 Aug 1999 10:58:09 +0200

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.)

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