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

Re: [Freeciv-Dev] Hex tileset

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv Dev <freeciv-dev@xxxxxxxxxxxx>
Subject: Re: [Freeciv-Dev] Hex tileset
From: Artur Biesiadowski <abies@xxxxxxxxx>
Date: Mon, 23 Aug 1999 13:33:23 +0200

Tatu Rissanen wrote:

> The fact is that mountain tops has to be drawn on a layer above flat
> terrain elements. This requires a lot more from renderer module than
> the current system. The renderer has to able to handle lists of graphics
> elements per hex putting them on different layers (merging the lists and
> ordering them by depth prior drawing).

Do you think about doing terrain transition on ground layer and then
drawing same mountains on top ? It could work. In other case there is no
reason to put mountains in different layer, as there will be nothing
between them and ground.

> The trickiest thing the renderer has to able to do is to determinate how
> much neighbour hexes are affected by drawing the current hex. The
> neighbour hexes could have some elements covering only some layers on
> the current hex and visa versa.
> I think we could cut corners here: allow graphics to extend only to the
> lower part of the above hex. A clipping mask could be used to enforce this.

I've done it by making hexes fitting in 60x60 pixels, but actual images
are 60x75 with extra space being above hex. Hexes are reapinted strictly
from upper row to lower row, so verything on upper is covered by
anything that crosses hex top boundary on lower one. 75 pixels reach
exactly into half of upper hex. There is also a possibilty of given hex
drawing something into two small areas of hexes below, but they will be
overwritten, so it has not real use. During given hex repaint graphics
are clipped to 60x75 area, so upper and lower hexes paint only parts
that will be partially covered by given hex, or will cover it.
Main hex area looks like this (but it can paint anywhere in this
rectangle):
(sligtly sqewed because letters non square - in fact main hex area fits
in square)


............
............
............
.....xx.....
...xxxxxx...
.xxxxxxxxxx.
xxxxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxx
.xxxxxxxxxx.
...xxxxxx...
.....xx.....


And here with other hex boundaries

.....||.....
.1...||...2.
.....||.....
..../xx\....
../xxxxxx\..
/xxxxxxxxxx\
xxxxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxx
\xxxxxxxxxx/
..\xxxxxx/..
3...\xx/...4


1 and 2 are painted first, then main hex (x) and then 3 and 4. Drawing
is clipped to rectangle shown here.


Artur


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