Scott MacFiggen wrote: > > 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. That may be a really good gain then with the latest client that does shading for darkness. Performance on that is pretty poor. Note that the client and server now support the sending of larger viewable maps - I don't know how much need there will still be for a fog of war, but its probably still useful for servers that have a max viewable map smaller than what the players really want. > 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? The problem here is that the client is presumed non trust worthy. Depending on peoples opinion, sending the players x,y coordinate may be giving away extra knowledge. Not for example it would then make it very easy to have it also automap, and this then may let players find secret treasure chambers or their way around mazes much more easily (I remember one maze map in brest which was no magic in a lot of it as well as having teleports to make life more difficult - if client knows the x,y whenever they hit a teleporter, such a map now becomes trivially easy). OTOH, this may not be a really bad thing - the number of maps that use that feature are small, and having an automap is a pretty cool thing in of its own. That said, there are more than just teleporters that move players around. pit traps for example - and this may be another case where knowing where you got dropped to pretty precisely could be helpful (think for example going through a dungeon but not exploring every side door, and going down a pit. You wander your way out, and you know that behind that door is the passage you hand wandered through earlier, so despite being beat up, you know its safe..) I'd have to let others comment on how big a security issue this may be. Like most things, security is balanced by usability. And this may very well be a case where it is determined that the usability of this information for fog of war or automapper is greater than the secrets it may give away about some dungeons. That said, another problem I do see you running into is automatic map tiling. The main point of this is that the movement between the tiled maps should be invisible - so this also means that things like monsters, spells, etc will cross the boundries without problems. And the way I envision doing it would not have the player go through enter_exit, so you would get no notification that he changed maps. This could be changed, and giving away the 'seams' of the map tiling probably would not be a big deal. And in some level, your fog of war code would probably also want to be able to handle this. > > -Scott > _______________________________________________ > crossfire-devel mailing list > crossfire-devel at lists.real-time.com > https://mailman.real-time.com/mailman/listinfo/crossfire-devel