Hi!
Does any one know if some where crossfire is keeping a log of client - server communications?
If not then can some one please give a hint how to do that?
Basically i am interested to log all the client-server communications while i play the game for better understanding of inner working of the game which could help me to design a AI bot for it.
thanks
client-server logs
Moderator: Board moderators
-
- Forum Fanatic
- Posts: 852
- Joined: Sun Jun 13, 2004 2:07 am
- Location: Hemel Hempstead
probably the easiest way is to run a network traffic monitoring tool like ethereal to capture traffic between the client and server - you could hack the source code to add printf's in the socket code, but ethereal is less effort.
You may also find it helpful to read
http://crossfire.cvs.sourceforge.net/*c ... ision=1.19
to make sense of what you see.
You may also find it helpful to read
http://crossfire.cvs.sourceforge.net/*c ... ision=1.19
to make sense of what you see.
As cavesomething said, "doc/Developers/protocol" in the server source, is very helpful. In fact, it is plenty detailed enough in order to reimpliment the protocol in whatever you want. I once reimplimented a majority of the protocol in python mainly for an experiment, and all I needed was "doc/Developers/protocol", as well as looking in the client source to check how it deals with a couple of the weirder points.
One thing to note: bigfaces (images that take more than one tile, which are only sent as one tile, so you need to read the image file's height and width to see how many tiles the object takes up), and containers, are the most difficult parts of the protocol to implement properly and can be a pain to debug.
One thing to note: bigfaces (images that take more than one tile, which are only sent as one tile, so you need to read the image file's height and width to see how many tiles the object takes up), and containers, are the most difficult parts of the protocol to implement properly and can be a pain to debug.