http://www.xbox.com/en-US/live/engineeringblog/default.htm
Xbox LIVE Parties
![]()
Posted March 23, 2010 by Eric Heutchy (SDE) - Jesiatha
Motivation
Xbox LIVE Parties was a new feature added in the New Xbox Experience, launched in 2008. Before that time, Xbox LIVE was a great place to play multiplayer games with your friends. However, as soon as you and your friends wanted to switch to a different experience, everything fell apart. The minute you quit your multiplayer session, you would lose voice communication. This meant that everyone would have to decide which game to launch and who would host the new game session prior to leaving the previous experience. Then you would sit through some silent moments while everyone changed games and waited for the game invite to come through. Finally, everyone would filter back into the same session and be connected by voice again.
When developing Xbox LIVE Parties, the team’s main goal was to keep people connected no matter what they were doing on Xbox LIVE. This guided us to the following principles:
- Keep players together in voice chat at all times
- Make moving from game to game with friends as smooth and easy as possible
- Work over all Xbox 360 titles
- Allow everyone to be connected even when in different experiences
Resources
In general, a major challenge in writing system software on Xbox 360 is to strictly limit the amount of resources the system consumes. Any time the system uses the CPU, GPU, or network, they become unavailable to games. To keep things as simple as possible for games, the Xbox 360 system software reserves a small amount of resources for running system software. A lot goes on in those system resources, including:
- The Xbox Guide
- The background music player
- Friends and Messages
- Windows Live Messenger
- Background downloads
- Xbox LIVE Parties
Since there is so much going on in the system, we spend a lot of time optimizing our resource usage. Every bit of performance we can squeeze out helps us add great new features!
Parties are a Game!
One way we think of Xbox LIVE Parties is as a second multiplayer game running at the same time as the traditional game you are playing. This seems strange at first, but it turns out that parties have a lot in common with traditional multiplayer games. Both maintain some sort of game state. For a more traditional game like chess, the game state would be a list of which pieces are at which location on the board. In Forza 3, the state would consist of each car’s speed, location, etc. For Xbox LIVE Parties we store a simpler set of state, including the list of party members, settings such as whether friends can join the party without an invite, and each party member’s current activity.
Another similarity between Xbox LIVE Parties and games is in the invite system. You can join a friend’s game session either from an invite message or by selecting “Join Game In Progress” from her gamercard. The same options are available for Xbox LIVE Parties. Under the hood, Xbox LIVE treats game invites and party invites in almost the same way. Part of a party invite is the necessary information to connect to your friend’s console. When you accept her party invite, your console uses that information to attempt to form a network connection with her console.
That leads us to the final similarity. Both a party and a traditional multiplayer game run on top of a network library – a collection of code that allows data to be sent between consoles. If I’m playing a game and I’m in a LIVE Party at the same time, my console keeps two sets of network connections up. One set is for the game and allows data to be sent to other people in my game. The second set is for my party and allows voice data to be sent to other party members. The entire time my console is sending and receiving data for both the game and the party.
Distributed Voice
The network traffic from your game and your party both take up one of the console’s limited resources: network bandwidth. One of the biggest optimizations we made to the code was to limit the amount of upload bandwidth that Xbox LIVE Parties use. Upload bandwidth is the data being sent from your console (as opposed to download bandwidth when data is sent to your console). In most game scenarios, upload bandwidth is scarcer than download bandwidth. When you speak into your microphone, the party system needs to send your voice data to up to seven other consoles. That means that speaking causes a huge upload spike – identical data is sent seven times, once per remote console.
To reduce that bandwidth usage, the party system employs a neat trick to distribute the upload bandwidth. If there are seven other people in my party, my console only sends data to three of them. That means roughly 60% less upload bandwidth is used. When those three consoles receive my voice data, they act as ‘repeaters’. That means that in addition to playing my voice back, they may also send it to the remaining consoles. With this algorithm, each console sends voice data to at most three other consoles. That limits the total amount of data uploaded in normal situations and spreads the bandwidth among party members.
Test Lab
Networking scenarios are enormously complicated, so the party team devoted a lot of engineering effort towards validating the quality of Xbox LIVE Parties. One method of verifying our feature was through UI Automation. This allows a PC to send commands to an Xbox 360 development kit (“devkit”) telling it to press certain gamepad buttons or asking what is happening on the console. When the automation tests run, it is like the console has a mind of its own. This automation software was then orchestrated across multiple devkits and programmed to create parties. It is fascinating to watch eight devkits automatically open up the Xbox Guide, send party invites to each other, and then send fake voice data to each other.
Once we had a suite of these UI Automation tests, we were able to put it through some stress scenarios. On our corporate network, the consoles had a very fast network connection which would not lose packets. In the real world, most people have a home Internet connection that is slightly slower than the Microsoft corporate network. We also have to worry about things like NATs, lost network packets and latency between people living on opposite sides of the world. To test those scenarios, we set up a network simulation tool which creates these various conditions and run through our UI Automation tests. We even test extreme conditions like a network connection running at modem speeds.
Results
All of this effort went into making it easier for you to communicate with your friends and to have a great time on Xbox LIVE. We have been able to work with great partners like Zune, Netflix, Sky, and Canal Plus to build parties in these applications and customize the social experience. Xbox LIVE Parties also work over all your favorite Xbox 360 games, either single or multiplayer. We hope that Xbox LIVE Parties improve your experience on Xbox LIVE, and we look forward to building more great social experiences in the future.
Thank you for reading!







