[Freeciv-Dev] [PATCH] a (nearly) full general-topology implementation
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I too have grown tired of the discussion, and decided to finish up the
implementation of general topologies.
I have placed the patch in the incoming directory (it is 85k in size).
Applying this patch and compiling will allow you to play with any of the
10 topologies that have been discussed . Each can be played with
either overhead of isometric view clients.
The topology can be set by setting the server options mapshape,
isometricmap, nswrap, ewwrap, width, and height. Then start the game
and play as normal. Make sure you use map generator 1 (others may work,
but it's unlikely).
This patch is certainly not CVS-ready. Hopefully, though, it will
provide some impetus to continue moving forward. I will continue to
provide smaller, manageable patches to move toward this goal.
I have noticed a few significant problems:
- Getting the overview map to display prettily will not be trivial. I
have adopted Gaute's idea of using a map_overiew_[xy]0 to track the
location of the overview map. However, with this system it's not really
possible to use the canvas backing store since there's no consistent way
to know how to wrap it. The overview is also stuck in flat view and
sized as xsize x ysize. The "correct" solution here would be to have an
isometric overview when we've got an isometric *map*. The view would
then fit cleanly into a rectangle (for the iso-rectangular maps, that
is). This will take a fair bit of work, but will have large payoffs
(it'll be really cool IMO).
- The isometric-view code as it is implemented now has a major flaw.
The top-left corner of the window is the tile
(map_view_x0,map_view_y0). This tile is centered at canvas position
(0,NORMAL_TILE_HEIGHT/2), the top corner of the tile is (0,0) and the
top-left corner of the surrounding square (which is used for drawing) is
(-NORMAL_TILE_WIDTH/2,0). With a map that wraps appropriately, this
works out fine. However, with one that does not (for instance a
non-wrapping iso-rectangle) this presents severe problems because
(map_view_x0,map_view_y0) is not even entirely within the window! The
correct solution here is to move everything right a half-tile, so that
the tile has its upper-left corner at (0,0) and is entirely within the
window. However, this will require significant changes to the
 Not all of them have been completely tested. In particular, I don't
think the iso-ellipse is fully implemented.
- [Freeciv-Dev] [PATCH] a (nearly) full general-topology implementation,
Jason Dorje Short <=