Halo Networking: An Interview with Chris Butcher

Getting your Priorities Straight

Chris Butcher continues:

"Basically, the system remembers what it sends to people. It knows that I have 5,000 pieces of information that I would like you to have, but I can only send you maybe 50 in this packet because the network only allows for certain size packet, transmitted a certain rate in order to not congest the network.

So it figures out the most important things are based on where you are, what you're doing, whether you're alive or dead, whether you're shooting at someone. You know if I'm shooting at someone and they're in front of me, I need to know about them at a very high priority. But if there's somebody behind me that I can't see, I don't need to know about them. The server determines the priority of objects. There are a lot of rules for things. Grenades have a priority between 50 and 70, but just a little object lying on the ground, maybe isn't a priority -- between 10 and 20 you know, or something like that. There are actually cases in which a low priority object wouldn't get rendered at all from the client side.

There are basically two types of data that get prioritized. There is the persistence state of objects which will always be sent eventually. They might take a long time and the reason for that if there is an object moving continuously with a low priority then you don't want to send information about that object until you've seen it. You might want an update every 10 seconds to say at a low priority, "Here's where it is." The priority system manages the priority of the objects, the time since it was last transmitted and how much information is needed to transmit that data.

There is persistent state and there is also a stream of events that are taking place in the world, like a bullet hit a wall or some guy said "urg" because he was killed. These events are the information we don't need to send. If it becomes necessary to drop events, we will. So for instance, if I blew up a million grenades in a multiplayer match, many of those grenades would just fall off the end because they couldn't go in the pipeline fast enough. They would be discarded as irrelevant. So there is this balance going on between things you have to have and things that are going on in the world that give you a better picture, but are not necessary.

This separation of data means we can support all kinds of interesting things. For example, because every client is being sent the persistent state of the entities in the world (the entities are what we call the persistent objects in the world), that means that any client has all the information about the world. Because the client knows everything about the world, we can support making them be a new server, if the server machine was to turn off, get disconnected from Xbox Live or the player just wants to leave the game. What happens is that the game pauses, a new server is determined, control is shifted and the game continues. It works in a LAN game too. So you can finish a game with a completely different set of players than when you started, because we have the technology to replicate that information and reassign a new server.

The potential of Xbox live could be really exciting. There are all kinds of interesting social ramifications to taking this game online. There's so much more to it than even what we've talked about. I'm not the best person to talk to about all of the social aspects of designing a user interface or directing players to games, but I can definitely talk about the network side of things."

You certainly can Chris, you certainly can.