Export (0) Print
Expand All

Getting Started With Networked Games

Dependency on Gamer Services

XNA Framework games must explicitly initalize the gamer services subsystem before networking API calls can be completed. Most games will use the GamerServicesComponent, a game component which takes care of the process of initializing and pumping the gamer services system. This component will automatically pass through the graphics device and window handle and call GamerServicesDispatcher.Update to pump the gamer services pump at regular intervals. To take advantage of this component, most games will simply need to add one line to the Game constructor:

Components.Add(new GamerServicesComponent(this));

For more information on the gamer services system, please see Gamer Services Overview .

XNA Creators Club and LIVE Membership Requirements

Developing and testing a networked game requires at least two machines, but you only need only one Xbox 360 console and one Creators Club membership to test your network code for the Xbox 360. This is because XNA Framework supports cross-platform system links so developers can run one instance of a game on an Xbox 360 and a second on a Windows-based computer. This functionality is enabled to help creators debug their titles.

It is also possible for more than one Windows-based computer to connect several machines in a system link session without any special memberships.

This table lists what memberships are required on the development computer and Xbox 360 console in a network session depending on the session type that has been created.

Xbox 360 ConsoleWindows-Based Computer
Run an XNA Framework GameLIVE Silver membership + Creators Club membershipNo memberships Required
Use System LinkLIVE Silver membership + Creators Club membershipNo memberships Required
Sign-on to Xbox Live and Games for Windows - LIVE ServersLIVE Silver membership + Creators Club membershipLIVE Silver membership + Creators Club membership
Use LIVE MatchmakingLIVE Gold membership + Creators Club membershipLIVE Gold membership + Creators Club membership
Bb975642.caution(en-US,XNAGameStudio.20).gifCaution
The XNA framework components that interact with Games for Windows LIVE require an XNA Creators Club membership. If, for any reason, a LIVE profile without a Creators Club membership is set to auto sign-in on a Windows-based computer, the game will not be able to connect to the LIVE service and the XNA framework gamer services components, including the Guide, will not be available. To disable auto sign-in for a LIVE profile on a Windows-based computer, launch an XNA framework game and open the Guide while disconnected from the network.

Hardware Requirements

It is not possible to run multiple simultaneous instances of a networked game on a single development computer.

When launching to multiple machines for network testing, we recommend that you load multiple copies of your solution into separate Visual Studio instances, one per machine.

For a system link game, any one of the following hardware configurations may be used to test a networked game:

  • One development computer and one Xbox 360 console (running one instance of the game on a Windows-based computer and one on Xbox 360). The creator will require one LIVE Silver and one Creators Club membership to run code on the Xbox 360.
  • One development computer and one client computer (running one instance of the game on each Windows-based computer). Creators cannot run two networked XNA Framework games at the same time on the same computer, so creators will need a second machine to run a second game instance for testing purposes. No LIVE memberships or Creators Club memberships are required for this scenario.
  • One development computer and two Xbox 360 consoles (running one instance of the game on each Xbox 360). Here a creator deploys and debugs the game on two Xbox 360s. The creator will need at least two LIVE Silver memberships and two Creators Club memberships (one pair for each Xbox 360) for this scenario.

If a game creator wants to use true LIVE matchmaking as opposed to system link over a local subnet, any one of the following hardware configurations may be used:

  • One development computer and one Xbox 360 console (running one instance of the game on the development computer and one on the Xbox 360). The creator will need two LIVE Gold memberships and two Creators Club memberships (one pair for each machine) for this scenario.
  • One development computer and one client computer (running one instance of the game on each computer). The creator will requre two LIVE Gold memberships and two Creators Club memberships (one pair for each machine).
  • One development computer and two Xbox 360 consoles (running one instance of the game on each Xbox 360 console). The creator will require two LIVE Gold memberships and two Creators Club memberships (one set for each machine).

Community Additions

ADD
Show:
© 2015 Microsoft