Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] to wrap or not to wrap?
Home

[Freeciv-Dev] to wrap or not to wrap?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] to wrap or not to wrap?
From: Jason Dorje Short <vze2zq63@xxxxxxxxxxx>
Date: Wed, 10 Oct 2001 10:34:13 -0400
Reply-to: jdorje@xxxxxxxxxxxx

If we assume that each equivalency class of map positions is a
collection differing only by a linear combination of given vectors, then
"updating" the client becomes much easier.

That is, if we limit our topologies to only those that wrap in simple
ways, we can write a wrap_map_pos(&vx, &vy) function that will wrap the
given coordinate pair [1] independent of it's being a actual tile.  This
can be used practically as-is in the current client implementation,
although I strongly feel that this implementation is flawed and should
be fixed anyway.

Basically, we're making a more stringent restriction on topologies so as
to take advantage of standard linear algebra techniques.  This
restriction will still allow rectangular and iso-rectangular maps that
wrap in either/both/none direction, but will not allow mobius strips or
klein bottles or "approximations of a sphere".  It will allow a much
faster "quick-fix" implementation of iso-rectangular and torus maps.


[1] But it's not really a coordinate pair.  Confusing, no?   We can have
a standard vector, say a goto route or some such, and wrap it to be in
the limited range.  This is basically what the client drawing routines
do.  Unfortunately the temptation is to USE the function once it's there
and this will likely lead to unsound code (as the client is now).

jason


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