Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2000:
[Freeciv-Dev] Re: Where can I get that Great Tileset?
Home

[Freeciv-Dev] Re: Where can I get that Great Tileset?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Erik Sigra <freeciv@xxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Where can I get that Great Tileset?
From: Thue <thue@xxxxxxx>
Date: Thu, 31 Aug 2000 00:59:28 +0200
Reply-to: thue@xxxxxxx

> > But note that you diverted from my original drawing on a point: you
modulused
> > the x values with the map xsize. You shouldn't do that! Take fx the tile
(4, 1)
> > and go -1 in the x direction. That will give the tile (3,1). That would be
beyond
> > the map, and with my numbering there would not be any tile with those
> > coordinates, and the tile could easily be tested for existance. That is not
possible with
> > your modulused numbering, which is a fatal flaw.
> 
> I renumbered it the way I did because I thought that every coordinate[0
> .. x(max)][0 .. y(max)] must represent 1 and only 1 tile. I thought this
> could make computation easier (for example things like map_adjust_x).
> That led me to the conclusion that x(max) must equal y(max) (with this
> system). (Is this correct?)

Umm, I don't follow through to the conclusion, but since I constructed map with
x!=y as the example I will assume it is the conclusion that is false. :)

> With your system, x(max) and y(max) could be different, but there would
> be coordinates in the array that does not represent tiles (you mentioned
> (3, 1)). As far as I can understand, this means that up to half of the
> array would be wasted memory space (since an unused array element can't
> be made to take up less memory than a used one)! (Right?) This would
> then halve the maximal map size a user could play with, with every given
> amount of memory.

When mapping a tile with an x value to memory you could then take the modulus
of x. Then the data structure would be a x*y sized array with no memory wasted.
In effect the map in memory would be based on your modified number mapping
scheme.

> > When you think my numbering scheme is confusing just tilt your head 45
degrees
> > :)
> > 
> > -Thue
> 
> -Erik
> 
> 

Note that my number mapping have a disadvantage compared to the civ 2 one: you
need both the x and the y coordinate to determine if a tile is valid. This is
not very serious; we already have a function normalize_map_pos() that does that.
But map_adjust_*() would have to be abandoned. But the map_adjust_*() functions
would have to be abandoned anyway to implemented a flat map, ie one that doesn't
wrap in the x direction, so this is not really an issue.

-Thue



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