Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2001:
[Freeciv-Dev] map wrapping (was: Profiling Civserver again)
Home

[Freeciv-Dev] map wrapping (was: Profiling Civserver again)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Trent Piepho <xyzzy@xxxxxxxxxxxxx>
Cc: Jason Dorje Short <jshort@xxxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] map wrapping (was: Profiling Civserver again)
From: Mike Kaufman <mkaufman@xxxxxxxxxxxxxx>
Date: Thu, 26 Jul 2001 18:37:46 -0500

> One thing I didn't point out before, is that with my method you can use
> different types of map wrapping.  Currently, freeciv has a map that wraps
> around on the east and west edges, but not on the north and south edges.  It's
> sort of like a cylinder.  You could also have a flat map that doesn't wrap on
> any edge, or a spherical map that wraps on all four edges.
> 
> With the way you have it, the map wrapping is hard coded into the iterator
> macro.  In order to use a different type of map, you would either need to
> recompile the server with a new macro, or stick some kind of gross pile of
> nested if()s inside the iterator to test for every kind of wrapping style.
> 
This I think is an important point. I'm agnostic about which macro or function 
eventually gets used (it ought to be quick), but whichever one that is, it 
should be able to handle all three kinds of maps. i.e. it should _not_ assume 
that the y direction doesn't wrap.

-mike


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