Complete.Org: Mailing Lists: Archives: freeciv-data: January 2003:
[freeciv-data] Re: Hexagonal tileset.
Home

[freeciv-data] Re: Hexagonal tileset.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-data@xxxxxxxxxxx
Subject: [freeciv-data] Re: Hexagonal tileset.
From: Reinier Post <rp@xxxxxxxxxx>
Date: Sat, 11 Jan 2003 22:42:55 +0100
Reply-to: freeciv-data@xxxxxxxxxxx

On Sat, Jan 11, 2003 at 02:19:50PM -0600, Bobby D. Bryant wrote:
> 
> On 2003.01.11 13:26:18 -0600 Bobby D. Bryant wrote:
> 
> [re using Andreas' hexmap tileset]
> 
> > Strictly speaking the horizontal move should be illegal.  Maybe you
> > can get the developers to support a hex mode where the horizontal
> > move is disabled?
> 
> Now that I've played a few minutes I see a couple of other things that 
> would need to be hacked in the game engine if they wanted to support 
> hexmaps as a first-class game option.
> 
>   o In additon to outlawing the horizontal moves (or vertical, for the 
> other hex orientation), those two hexes need to be considered "not 
> adjacent to the unit" for other game purposes as well, such as 
> visibility.

ramble:

As far as I can see everything in Freeciv that has is related to the
map topology is based on the adjacency relation between tiles which
is the relation that exists between two tiles if and only if
some unit can move from one to the other in a single step.
(This relation is always symmetric.)

The only thing about maps that cannot be reduced to the adjacency relation
as far as I can see is the terrain generation - which generates colder
and warmer terrain based on tile positions.

So the Freeciv game engine in order to be completely general
should do everything based on this basic adjacency relation on tiles.
Of course the tiles also have to be stored into memory and if the adjacency
relation forms form a rectangular grid it's an obvious optimization
to store them as a 2D array and work with 2D array coordinates directly.
This also provides a numerical addressing system for tiles something a
general adjacency relation doesn't do.

And the adjacency relation is still constrained by the fact that in
the Freeciv client it is very desirable to display adjacent tiles
next to each other and steps and moves between tiles would still have
to be mapped to movement keys - presumably the arrow keys and possibly
a few more.  This severely limits the range of feasible adjacency
relations but it does allow something like a truly spherical world.

:end of ramble

The current plan afaik is not to do anything as rash as this but
merely generalize the existing 2D array-based representation a little
to support toruses.  I suppose suppoorting hex grids isn't much harder.

-- 
Reinier


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