[CF-Devel] client support for big map checked in.

Mark Wedel mwedel at scruz.net
Tue Jun 5 01:41:28 CDT 2001


 I've just checked in the code that lets the client use the larger viewable map
size that I checked into the server last night.

 There is a bug in that if you use the -pngximage option, the client will spew
these to stderr:
Gtk-CRITICAL **: file gtkobject.c: line 1070 (gtk_object_get_data_by_id):
assertion `GTK_IS_OBJECT (object)' failed.

Gtk-WARNING **: invalid class type `(unknown)' in cast to `GtkObject'


 I'm not sure of a fix.  I know it is related to the drawing function in some
way (as if I comment out the calls to gdk_draw_rgb_image I don't get those
errors, OTOH, you don't get a viewable map, so that doesn't seem like a very
good solution.  As best as I can tell, there is nothing in the calls themselves
that look to be wrong.

 In any case, in my short testing, I haven't noticed any problems with the
actual working of the code, other than those annoying messages.

 Do note that you may really want to check the performance of your system/client
when using the larger maps.  a 25x25 map is really 5 times the number of pixels
(800x800 in png mode).  I noticed in simple testing (running around the town)
that before I did some optimization, after I stopped hitting the control key,
and I would still keep moving for a while because the client fell behind.

 you can uncomment the TIME_MAP_REDRAW at the end of cconfig.h - if using the
gtk client it will print how long the redraw/updates have taken.  since each
tick is 120 ms, anything more than that your really in trouble - having it below
100 ms seems to be a good thing.

 Note if you do use the -pngximage option, you get cooler lighting effects - a
demo picture is at 
     
     http://tavern.santa-clara.ca.us/inter.gif
     
     

 If you do nott use -pngximage option, there is no lighting modification for big
maps (small maps (<15 in both directions) still use the old lighting bitmask.  I
thought of implementing that bitmask for the other drawing modes, but IMO its
pretty ugly, and probably just better to give the reduced sight (which the
server takes care of) than go through that ugliness (not that this is pretty
easy to do with old map/client anyways - just make a new dark1,dark2,dark3
images and put them in the .crossfire/gfx directory - these new ones should just
be completely transparent. ).

 I've played around a bit on 19x25 maps, so non square maps certainly do work. 
And in fact, given the layout of the client, I find such rectangular maps make
more use of the space.

 Note that the x11 client does also support the big maps - I just did not (nor
am I likely) to bother with adding in these other features for that.

    
    


More information about the crossfire mailing list