11
\$\begingroup\$

I know that XNA for Xbox 360 has limited access to networking, rumored to only allow communication via a propitiatory Microsoft protocol to other Xbox 360 units.

What are the networking possibilities XNA offers? How many Xbox 360 units can be connected to the same subnet? 16 maximum? Can any Xbox send data to any other Xbox on the subnet like Peer-to-peer communication? Can an Xbox communicate with XNA on Windows PC's as well? Are there any other devices you can communicate with?

And what about game servers? Can you setup your own multiplayer game server and have Xbox's connect to it and communicate freely? What platform would you write the game server code in? C++ on Unix? How many Xbox units can connect to a server at a time? If you cannot setup your own game server are there unofficial 'hacks' that enable indie developers to develop and run a game server?

Since I'm no Xbox developer (ie. I don't own a $10000 devkit) I cannot use C++ libraries like Zoidcom.

\$\endgroup\$

2 Answers 2

10
\$\begingroup\$

Data transfer over LAN or Internet

There are two types of online multiplayer games available when you create a networked game with XNA Game Studio:

  1. System link game sessions (LAN)
  2. LIVE sessions. (Internet)

Session types available:

  1. Use System Link for Local Area Network gameplay
  2. Sign in to Xbox LIVE and Games for Windows - LIVE Servers
  3. Use LIVE to connect to other machines over the Internet while the game is in development

Data transfer between connected Xbox and PC units is implemented using the LocalNetworkGamer class (supported on Xbox 360) and data is written using a PacketWriter as follows:

foreach (LocalNetworkGamer gamer in session.LocalGamers)
{
    // Get the tank associated with this player.
    Tank myTank = gamer.Tag as Tank;
    // Write the data.
    packetWriter.Write(myTank.Position);
    packetWriter.Write(myTank.TankRotation);
    packetWriter.Write(myTank.TurretRotation);
    packetWriter.Write(myTank.IsFiring);
    packetWriter.Write(myTank.Health);

    // Send it to everyone.
    gamer.SendData(packetWriter, SendDataOptions.None);

}

Network topologies

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 creator needs one Xbox 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 computer). Creators cannot run two networked XNA Framework games at the same time on the same computer. Creators need a second machine to run a second game instance for testing purposes. No Xbox 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 needs at least two Xbox LIVE Silver memberships and two Creators Club memberships (one pair for each Xbox 360) for this scenario.

Voice transfer over network

Voice data is automatically transmitted and replayed without any title effort whatsoever. Titles can use this to implement team chat or proximity voice.

The XNA Framework does not expose direct program access to the voice data stream.

  • Do they have voice access? - NetworkGamer.HasVoice
  • Are they currently talking? - NetworkGamer.IsTalking
  • Are they muted? - NetworkGamer.IsMutedByLocalUser
\$\endgroup\$
4
\$\begingroup\$

XNA Games on 360 use and are required to use Live -- which as I recall means max users per "game" is 32, and you can not connect to any outside services at all.


Update 1: Form post confirming the 32 player max -- http://forums.create.msdn.com/forums/t/27446.aspx


Update 2: It should be noted that XNA on Windows != (XNA on Xbox | XNA on Windows Phone) that is to say that on Windows, XNA can do anything any other .NET application can do; on Xbox and WP7 XNA is restricted to using the Xbox Live Gaming Services.

MSDN Documentation on Xbox Live and XNA -- http://msdn.microsoft.com/en-us/library/bb975642.aspx

\$\endgroup\$
5
  • \$\begingroup\$ On the same forum page : "For me, I use System.Net as the building base for my network component. I like how its enough of low-level that can provide me with stuff like "socket", "bind()", etc. But also you can use any other network library, it's up to individual's tastes. :)" \$\endgroup\$ Nov 2, 2010 at 15:17
  • 1
    \$\begingroup\$ Your confusion is understandable, but on Windows XNA can use any networking component because on Windows XNA is just .NET code; however, on Xbox you are forced to use Live because the Xbox's implementation of the .NET Framework doesn't contain any network implementation except for the Live gaming network. \$\endgroup\$
    – Nate
    Nov 2, 2010 at 15:21
  • 2
    \$\begingroup\$ XNA Games on 360 use and are required to use Live - Absolutely wrong. MSDN itself confirms that Xbox 360 games can use System Link (which is LAN) or LIVE game servers for multiplayer gameplay. Highly uninformed answer. Open up the very MSDN article you linked and goto the "XNA Creators Club and Xbox LIVE Membership Requirements" section and read the initial paragraph. \$\endgroup\$ Nov 2, 2010 at 17:01
  • \$\begingroup\$ I made the assumption that the question was regarding an Internet based game; since in my experience, system-link on LAN is a very rare scenario... \$\endgroup\$
    – Nate
    Nov 2, 2010 at 19:49
  • \$\begingroup\$ That's a curious assumption since the purpose of my question was to ask for possibilities, and your answer closed down a whole wide field of open possibilities in networking. Luckily I didn't believe you instantly and researched for myself. Otherwise the lot of us would be left believing that Xbox 360 has virtually no networking capabilities apart from comm with LIVE servers. \$\endgroup\$ Nov 2, 2010 at 20:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .