[Freeciv-Dev] Re: Map coordinate cleanups.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, Aug 18, 2001 at 07:12:24PM -0700, Kevin Brown wrote:
> Trent Piepho <xyzzy@xxxxxxxxxxxxx> wrote:
> > 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.
>
> This gives me an interesting idea. I haven't really looked, so if
> it's already implemented then slap me. But:
>
> If we set up the code so that you can define a map with intentionally
> "unreal" locations (with such a location represented, say, by a space
> character), then you should be able to get all sorts of interesting
> topologies (well, crude approximations of them, anyway) out of it with
> relatively simple wrapping rules. Maybe. I'm trying to come up with
> a simple way of going from real tile to real tile when wrapping
> through unreal tiles and which behaves as you'd intuitively expect
> (more or less). Going N/S/E/W is easy, I think: you wrap around that
> direction until you hit a real tile, and that's where you land. The
> question is what to do for diagonal moves, and I haven't figured out
> that one yet. I'm tempted to say you should move to the unreal tile
> then move in one component direction (e.g., N or E if the move was NE)
> until you hit a real tile. The component direction you use is
> whichever gets you onto a real tile in the shortest map distance (so
> unreal tiles count for the distance) in the component direction, or a
> preferred component direction if they're equidistant". But I'm not
> sure how well that would really work.
>
>
> Hmm...maybe this isn't such a good idea after all. :-( What do you
> guys think?
What topologies can be reprsented this way? How does they look like
with such "extra unreal" tiles? IMHO
neighbour( neighbour(p, some_direction), reverse_direcion(some_direction)) ==
p
Since else you have problems displaing it.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Make it idiot-proof and someone will make a better idiot."
- [Freeciv-Dev] Re: Map coordinate cleanups., (continued)
- [Freeciv-Dev] Re: Map coordinate cleanups., Raimar Falke, 2001/08/19
- [Freeciv-Dev] Re: Map coordinate cleanups., Jason Dorje Short, 2001/08/18
- [Freeciv-Dev] Re: Map coordinate cleanups., Raimar Falke, 2001/08/19
- [Freeciv-Dev] Re: Map coordinate cleanups., Arien Malec, 2001/08/19
- [Freeciv-Dev] Re: Map coordinate cleanups., Gregory Berkolaiko, 2001/08/18
- [Freeciv-Dev] Re: Map coordinate cleanups., Trent Piepho, 2001/08/18
- [Freeciv-Dev] Re: Map coordinate cleanups., Kevin Brown, 2001/08/18
- [Freeciv-Dev] Re: Map coordinate cleanups.,
Raimar Falke <=
- [Freeciv-Dev] Re: Map coordinate cleanups., Ross W. Wetmore, 2001/08/19
- [Freeciv-Dev] Re: Map coordinate cleanups., Ross W. Wetmore, 2001/08/19
- [Freeciv-Dev] Re: Map coordinate cleanups., Gregory Berkolaiko, 2001/08/19
- [Freeciv-Dev] Re: Map coordinate cleanups., Gaute B Strokkenes, 2001/08/19
- [Freeciv-Dev] Re: Map coordinate cleanups., Raimar Falke, 2001/08/19
- [Freeciv-Dev] Re: Map coordinate cleanups., Gregory Berkolaiko, 2001/08/19
- [Freeciv-Dev] Re: Map coordinate cleanups., Raimar Falke, 2001/08/19
- [Freeciv-Dev] Re: Map coordinate cleanups., Ross W. Wetmore, 2001/08/19
- [Freeciv-Dev] Re: Map coordinate cleanups., Raimar Falke, 2001/08/19
- [Freeciv-Dev] Re: Map coordinate cleanups., Ross W. Wetmore, 2001/08/17
|
|