The open-source game engine and graphics engine for multiplayer, cross-platform, real-time 3D action

It is currently 2014-11-01, 14:16

All times are UTC + 1 hour [ DST ]




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
PostPosted: 2012-06-02, 12:13 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1982
Location: Germany
My recent work for improving the game and entity code turned out to have a large effect on the networking layer in the Cafu Engine as well: Moving the serialization and deserialization of entity state from the management code into the entities themselves is the first key step to achieve the desired improvements in code design, as it cleanly separates entity from network implementation details.

During my work in this regard, I found it highly useful to employ Wireshark for analyzing the network packets that a Cafu client and server actually exchange. In the past, when the Cafu network protocol was initially developed, we used Wireshark only for capturing the network traffic, optionally prefiltering it, and to save it to disk. Then we used our own, hand-written C++ program "ReadDump" for analyzing the resulting dump file.

However, it turned out that both maintaining and even using the "ReadDump" program was very inconvenient and in fact rather painful - and it took not long until it became outdated: not able to read the latest version of the Cafu network messages, and thus useless.

As a result, last week I dug myself into Wireshark again, and much to my joy found that they have a (relatively) new feature that allows to write dissectors for analyzing any given protocol in our favorite scripting language Lua.

As a result, we can have the Cafu Engine network protocol dissected and analyzed directly in Wireshark. Even though my first attempt at such a dissector is probably somewhat clumsy and certainly still incomplete, it already turned out to be a lot more convenient to use than our previous tool, leads to insights much faster, and as a result, is a lot more helpful.

Here is an example screenshot from one of my sessions:
wireshark-session.png
Image Detail Image Download



If you would like to see the related Wireshark dissector itself, here is the script file (which also has additional links if you're interesting in further technical details):
http://trac.cafu.de/browser/cafu/trunk/ ... k-cafu.lua

In summary, a Cafu-specific dissector for Wireshark helped me a lot with making the changes to the network protocol that we need to advance our game code. I've finished many of these changes already, and will commit them to our code repository in the next few days.

_________________
Best regards,
Carsten


Top
 Profile  
 
PostPosted: 2012-06-02, 16:37 
Offline

Joined: 2011-05-31, 07:37
Posts: 95
It's great Cafu's netcode is getting updated and cleaned up, especially since everyone who's interested in Cafu is interested in networked games/sims.


Top
 Profile  
 
PostPosted: 2012-06-03, 22:27 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1982
Location: Germany
HWGuy wrote:
It's great Cafu's netcode is getting updated and cleaned up, especially since everyone who's interested in Cafu is interested in networked games/sims.


Yes, and it seems that every new developer first looks into the game and entity code, which is very understandable, but - so far - gave no good initial impression.
:cheesy:

All the more important are these changes.

_________________
Best regards,
Carsten


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Exabot [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group