Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: Map coordinate cleanups.
Home

[Freeciv-Dev] Re: Map coordinate cleanups.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Map coordinate cleanups.
From: Trent Piepho <xyzzy@xxxxxxxxxxxxx>
Date: Sat, 18 Aug 2001 14:05:21 -0700 (PDT)

On Sat, 18 Aug 2001, Gregory Berkolaiko wrote:
> > You have basically understood everything.  The only thing that I have
> > to add is this: normalization is independent of realness.
> 
> IS_WRAPPED = wrapping rules applied but not necessarily real


As others (Ross?  David?) have pointed out, the purpose of wrapping
coordinates is to discover which real tile they refer to.  If coordinates
do not refer to a real tile, then they cannot be wrapped in a meaningful way. 
It might appear that if you wrap the X coordinate around and leave the Y the
same, you have wrapped a non-real coordinate, but that's just an illusion.


Consider a diamond shaped map that's supposed to play like a sphere:

X    0  1  2  3  4
Y
          +--+
0         |  |
       +--+--+--+
1      |  |  |  |
    +--+--+--+--+--+
2   |  |  |  |  |  |
    +--+--+--+--+--+
3      |  |  |  |
       +--+--+--+  
4         |  |
          +--+    

Coordinates wrap around the east and west edges, but not the north and south. 
For example, (0,1) would wrap around the edge to (3,1), and (-1,2) would wrap
to (4,2).  What would the coordinate (4, -1) wrap to?  Since it's a not a real
coordinate, there is no meaningful way to wrap it.  The cylinder topology just
creates the illusion that it is possible to wrap non-real coordinates.



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