[CF-Devel] SDL enable GTK client / Fog of war

Scott MacFiggen smurf at CSUA.Berkeley.EDU
Mon Jun 4 00:33:13 CDT 2001


I've been working on enabling SDL on the GTK client and also
adding a fog of war feature where seen but currently out of view
tiles are still displayed but with a black square with 50% 
translucense set. It pretty much works at this point, and SDL seems
to blit about 3x faster the gdk although it doesn't feel any faster.

I have run into two problems though.

First problem is the server doesn't send the client an update when it jumps
to a new map, which is a problem since I keep state on what has been
seen on the current map so far. I fixed this easily enough by adding
a newmap( x,y) protocol command to the server which is called at the end of
enter_map.

Second problem is a bit tricker I think. When the player gets teleported 
the server just sends mapupdate commands.. Since I have to keep track of
where the character is on a 255x255 array, this tends to cause me to
overrun my array bounds.. This only seems to be a problem when teleporting
within the same map, like in shops since teleporting to a new map causes
the newmap command to be sent.

What is the best solution for this? And are thier anymore problems similar
to this that I might run into? 

	-Scott

    
    


More information about the crossfire mailing list