How can i check/inspect the performance of my network game via Wireshark and specifically the Graphs available in Wireshark,i want to test the performance of my network game. which kind of graphs can be helpful and relevant and give me the idea of network performance of my game? i m really newbie to networking so i m unable to decide.

| improve this question | | | | |
  • \$\begingroup\$ What specifically are you looking to test? How "chatty" is your game? \$\endgroup\$ – Nate Jun 9 '11 at 21:40
  • \$\begingroup\$ when you say performance do you mean number of packets sent and recieved? \$\endgroup\$ – Ali1S232 Jun 9 '11 at 22:02
  • \$\begingroup\$ any thing by which i can say.. by showing graphs; these are results by using this or that network layer for my game. i want to be specific about Wireshark TCP Stream Graphs, are RTT and Throughput graphs relevant? or they reflect overall network performance. \$\endgroup\$ – static void main Jun 9 '11 at 22:49
  • \$\begingroup\$ i learn that these two metrics are dependent on the other factors so which other graphs can i use for presenting my game network layer performance or they can be also relevant? \$\endgroup\$ – static void main Jun 9 '11 at 23:04
  • \$\begingroup\$ did you try windows resource monitor it give's data filtered by process or connection. the only problem is that it doesn't save the logfiles. \$\endgroup\$ – Ali1S232 Jun 9 '11 at 23:16

Tools like WireShark are excellent (partly because they're free and open source, but also because the functionality they offer is fantastic), but they'll only be useful with regards to knowing what's going on on your network.

Some things to keep in mind when developing network communications for your network game:

  • Minimize the number of packets (e.g., send an error code with a text description in one packet instead of separating these items into two separate packets).

  • Send the smallest pieces of information possible (e.g., design your protocol to send a single byte code for "use weapon" or "move forward one tile" instead of sending a command like "USE WEAPON" or "MOVE FORWARD").

To test out your networking, set up some separate hosts on your network and start transferring large amounts of data between them to saturate your network (tools like WireShark will be very helpful here because you'll be able to see what's going on with your network during this time), then see how your game performs.

What you want to do is to create a scenario where your game will lag, and then you want to see how your game works during these lag times. I'd venture a guess that one very common scenario would be that the players are also running torrent transfers in the background (possibly without even realizing that they are, either because the application minimizes to a System Tray icon {out of sight, out of mind}, or they have SpyWare installed {anyone remember KaZaa?}), so you may want to test your game with these sorts of things running as well to see how your game performs.

I recommend you put a lot of careful thought into your protocol. Ask yourself questions like "What commands will the player likely be triggering more often?" The less common commands could be two bytes or longer while the more common ones should be kept to one byte. Another advantage of using byte codes for commands is that fewer CPU cycles are required for command generation and parsing, which means that the rest of the game play gets more processing power to make the overall experience just a little bit better for the players.

| improve this answer | | | | |
  • \$\begingroup\$ Thanks but you mostly discussed general network game testing,and i already go through all of this process (and i m sending serialized objects not commands)and creating game, now i m testing this and also decided to choose Wireshark and what ever capabilities it's offering in the form of graphs. i ask about the capabilities specially graphs which can be relevant to my game and give the idea of game performance, PS:actually i know i need to ask this question to some Wireshark experts who worked with that frequently, but i m unable to find such forum. \$\endgroup\$ – static void main Jun 10 '11 at 11:12
  • \$\begingroup\$ Try the #WireShark channel on the FreeNode.net IRC network, for it seems to be fairly well populated (at least three dozen participants were in the channel just a few minutes ago) and I've found most folks on FreeNode.net to be very helpful. If you don't have an IRC client, you can use the web-based option here: webchat.freenode.net \$\endgroup\$ – Randolf Richardson Jun 10 '11 at 18:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.