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

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

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: to wrap or not to wrap?
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 10 Oct 2001 17:23:56 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Oct 10, 2001 at 10:34:13AM -0400, Jason Dorje Short wrote:
> 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.

I don't understand. What should wrap_map_pos be? Should
wrap_map_pos(&x,&y) set x=map.xsize and y=0 for the current map?

> 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).

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "I do feel kind of sorry for Microsoft. Their attornies and marketing
  force must have tons of ulcers trying to figure out how to beat (not
  just co-exist with) a product that has no clearly defined (read
  suable) human owner, and that changes on an hourly basis like the
  sea changes the layout of the sand on a beach. Severely tough to
  fight something like that."
    -- David D.W. Downey at linux-kernel


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