Chapter 15. Multiplayer and Xbox Live

This chapter is about multiplayer game programming and networking concepts. This knowledge will help you no matter which kind of multiplayer game you want to write. It does not matter if it is a role-playing game, strategy game or a first-person shooter; the basic knowledge of writing a networking game or application will be very helpful and you can see that most of the classes can stay the same. You just handle the data differently depending on the game structure and game modes.

This chapter is also all about networking, Xbox Live, and Games for Windows Live. It does not matter what kind of game you want to write; if you want multiplayer support beyond split screens, you will need a powerful networking API. XNA 2.0 happens to deliver just that, but at the time of this writing, it is not publicly available. For that reason, you are going to learn all about networking with the System.Net classes from the .NET Framework. The knowledge is applicable to XNA 2.0 networking. You can save some code by not having to write your own messaging and session management classes because XNA 2.0 already handles all that for you, but it does not hurt to know about how they work. While System.Net provides all the low-level classes you ever need on Windows for network programming; it is not supported on the Xbox 360 via XNA yet. XNA 2.0 uses an own networking API and you can only use this API for any network communication on the Xbox 360. If you just want to write ...

Get Professional XNA™ Programming: Building Games for Xbox 360™ and Windows® with XNA Game Studio 2.0, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.