Less Traffic Less Often

I manage the Microsoft Game Technology Group. One of the services that our team provides is network reviews of in-progress games (Windows and Xbox 360). We’ve examined a wide variety of game genres and styles over the past few years. By far the two most common issues are:
1) Games sending more data than they need to
2) Games sending data more often than they need to
These two problems result in games that are not tolerant of low bandwidth conditions. What’s continually surprising to me is how little time game developers are willing to invest in network performance optimization, when they often take great pride in optimizing graphics and CPU performance. Sure, network optimizations are not be immediately gratifying in the way that graphics and framerate improvements are, but the bang for the buck is a lot higher. Good network optimizations mean your game will be playable by more people and that they’ll have a more enjoyable experience.
You could fill a book with network optimization techniques, so I’ll just list a few quick ones here:
  • Don’t send what you don’t use. It sounds simple, yet most games send more data than they need to.
  • Compress the data. I wrote an article about one compression technique, bit packing, in Game Programming Gems 4.
  • Don’t tie your send or receive frequency to the game’s framerate — it’s a recipe for disaster. Keeping networking independent of framerate gives you much more flexibility and allows you to tune network sends without worrying about whether the game is running at 60Hz or 15Hz.
  • Unfortunately, network packets contain more than just the data your game cares about. Network packet headers can consume a lot of bandwidth — with no benefit to your title. Reduce bandwidth by avoiding multiple network sends. Simply accumulate network data in a buffer and only send the contents of the buffer every 100 mS or so (or less, if you can get away with it).
  • Test in a low bandwidth environment. A game studio’s network infrastructure does not remotely emulate Internet conditions. Test with tools that can throttle bandwidth and drop packets. Alternatively, build the emulation framework into your network engine itself.

Although Internet conditions are gradually improving worldwide, bandwidth can still be very limited and latency can spike. To appeal to the broadest set of consumers, it is well worth your time to optimize your network layer.

This entry was posted in Game Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s