Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: unification of tile_visible_mapcanvas
Home

[Freeciv-Dev] Re: unification of tile_visible_mapcanvas

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bursig@xxxxxxxxx, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: unification of tile_visible_mapcanvas
From: Jason Dorje Short <vze49r5w@xxxxxxxxxxx>
Date: Wed, 20 Nov 2002 08:51:59 -0500
Reply-to: jdorje@xxxxxxxxxxxxxxxxxxxxx

bursig@xxxxxxxxx wrote:
Specifically, gen-topologies will require significant changes in the GUI.  To 
support
iso-rectangular maps (like what Civ2 uses) requires changes in a whole host of 
places.


Wait a minute. Pleass explain me what you mean in "gen-topologies" and 
"iso-rectangular maps".

gen-topologies is a concept Ross and I have developed, building on the work of Thue and others. The concept allows either rectangular or iso-rectangular maps, wrapping in any given set of directions. A lot of background work has gone into this, but it is still missing support in a few places - one of which is the GUI.

You can see this in action by looking at Ross's corecleanups patch (in the incoming directory of freeciv's FTP). Unfortunately, this patch is quite monolithic - and even so it only gets gui-gtk to work. This is a problem. Thus, more background work includes unifying these GUI functions where possible, so that when we do agree on a solution it only needs to be changed in one place.

The full explanation of this system is rather lengthy. The short explanation is that an iso-rectangular map looks like

X X X X X X
 X X X X X X
X X X X X X
 X X X X X X
X X X X X X

which is the way maps look in civ2, SMAC, and civ3. It looks _much_ better than the standard freeciv map when you're using an isometric tileset. If your client uses the core mapview functions, then when gen-topologies is brought to all the other clients it will come to yours as well. If not, then there will be problems and special-cases all over the place.

I implement new position code becouse I want have "spheric maps" and my code 
let me this.

You can't have spherical maps.  Our scientists have proven it :-).

What you actually have is a torus map - except you don't, really, unless there's support for it in lots of other places besides the GUI. These types of maps will be supported by gen-topologies.

Another example is that it takes a lot more work for you to write custom code to do the same things the common code does. For instance, your get_mcell_xy is the equivalent of get_map_xy - but it hard-codes a 64x32 isometric tileset.


Yes it is hard-coded but I plan make it more configurable.
For now if you want another size of tiles just unrem first two lines in this 
function and rem anothers lines.

In future I want add (var) accelerators in place ...<< 5; and ...< 4;

( ...<< WIGHT_ACCELL; ...<< HIGHT_ACCELL; ) that are loaded with tilespec.


All you get in return is a slight speed boost.  This is not a good tradeoff.


That depend on yours resolution and CPU. I have p200MMX and in res. above 
800x600 I can see this speedup. ( I use this code in drawing fuctions ).

For most users, tweaking the code to use a different sized tileset is not an option. Could you find a way to speed up the code in mapview_common instead?

jason



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