Share via


Prerequisites for Developing Xbox LIVE Multiplayer Games on Xbox 360

Bb975642.note(en-us,XNAGameStudio.41).gifWindows Specific Information

Games for Windows - LIVE is unavailable to finished games. This functionality is not included in the redistributable version of the XNA Framework. A game that attempts to use these components without XNA Game Studio installed will result in a GamerServicesNotAvailableException.

Dependency on Gamer Services

XNA Framework games must explicitly initialize the gamer services system before networking methods are called. Gamer services allows your game to receive notifications such as sign-in status changes and game invitations and other messages from Xbox LIVE, and it gives your game access to the Guide. The Guide provides a user interface that allows players to sign in to Xbox LIVE, to view messages or game invitations, and to use Xbox LIVE user interface elements such as the on-screen keyboard during a game.

Most games use GamerServicesComponent, a game component that wraps the GamerServicesDispatcher object and takes care of sending and receiving messages from Xbox LIVE. This component also passes in the graphics device and window handle to allow rendering of the Guide, and it calls GamerServicesDispatcher.Update at regular intervals. To use this component, most games only need to add one line to the Game constructor:

Components.Add(new GamerServicesComponent(this));

For more information about Gamer Services, see Introduction to Gamer Services.

App Hub and Xbox LIVE Membership Requirements

There are two types of online multiplayer games available when you create a networked game with XNA Game Studio: system link game sessions and LIVE sessions. These two forms of online multiplayer gaming describe if the multiplayer gaming session is on the local area network (system link games), or if the gaming session is advertised and found through the LIVE Service. With system link games, you can search the local area network to find the gaming sessions. With LIVE sessions, you can use the LIVE Service to find available game sessions. Use the searchProperties argument of NetworkSession.Find to specify the parameters used to search for an available game session—a game session that uses either system link or the LIVE service.

Developing and testing a networked game requires at least two machines, but you only need one Xbox 360 console and one App Hub membership to test network code for the Xbox 360. This is because the 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 helps creators debug their titles without having to purchase a second console. It is also possible for more than one Windows-based development computer to connect several machines in a system link session without any memberships required.

Memberships are required for a player on a Windows-based computer and an Xbox 360 console in a network session, depending on the session type that has been created.

  Xbox 360 console Windows-based development computer Windows Phone
Run an XNA Framework Game LIVE Silver membership + Premium App Hub membership No memberships required No memberships required
Use System Link for Local Area Network gameplay LIVE Silver membership + Premium App Hub membership No memberships required Not available on Windows Phone
Sign in to Xbox LIVE and Games for Windows - LIVE Servers LIVE Silver membership + Premium App Hub membership LIVE Silver membership + Premium App Hub membership Not available on Windows Phone
Use LIVE to connect to other machines over the Internet while the game is in development LIVE Gold membership + Premium App Hub membership LIVE Silver membership + Premium App Hub membership Not available on Windows Phone

Warning

XNA Framework components that interact with Games for Windows - LIVE require an App Hub membership. If for any reason a LIVE profile without an App Hub membership is set to auto sign in to a Windows-based computer, the game will be unable to connect to the LIVE Service. Furthermore, the XNA Framework gamer services components, including the Guide, will be unavailable. To disable auto sign in for a LIVE profile on a Windows-based computer, disconnect from the network, launch an XNA Framework game, and then open the Guide.

Hardware Requirements

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

When you launch 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, you can use any one of the following hardware configurations to test a networked game:

  • One development computer and one Xbox 360 (running one instance of the game on the development computer and one on the Xbox 360). The developer needs one Xbox LIVE Silver and one App Hub membership to run code on the Xbox 360.
  • One development computer and one client computer (running one instance of the game on each computer). Developers cannot run two networked XNA Framework games at the same time on the same computer. Developers need a second machine to run a second game instance for testing purposes. No Xbox LIVE memberships or App Hub 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 developer deploys and debugs the game on two Xbox 360s. The developer needs at least two Xbox LIVE Silver memberships and two App Hub memberships (one pair for each Xbox 360) for this scenario.

If you want to use Xbox LIVE to connect to gaming machines over the Internet as opposed to using system link to connect gaming machines over a local subnet, you can use any one of the following hardware configurations:

  • 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 developer needs one Xbox LIVE Gold membership and one Xbox LIVE Silver membership and two App Hub 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 developer needs two Xbox LIVE Silver memberships and two App Hub 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 developer needs two Xbox LIVE Gold memberships and two App Hub memberships (one set for each console).

See Also

Setting up your Firewall