client-server logs

Technical and coding related questions.

Moderator: Board moderators

Post Reply
asi
Newbie
Posts: 5
Joined: Sun Jun 25, 2006 1:00 am

client-server logs

Post by asi »

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
cavesomething
Forum Fanatic
Posts: 852
Joined: Sun Jun 13, 2004 2:07 am
Location: Hemel Hempstead

Post by cavesomething »

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.
Rednaxela
Senior member
Posts: 434
Joined: Wed Jan 26, 2005 5:13 am

Post by Rednaxela »

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.
Post Reply