Jump to content

  • Log In with Google      Sign In   
  • Create Account

How do peer-to-peer games work?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 bleabox   Members   -  Reputation: 100

Like
0Likes
Like

Posted 13 November 2009 - 10:18 AM

I was a bit surprised to hear that most games on the Xbox use peer-to-peer technology for multiplayer. I didn't even think that would work, since some computer most contain the state of the game world, or at least so I thought. Among the games that use Peer to peer are Halo 3 and Modern Warfare 2. Both action games with a lot of things going on in them. Now how do these work? If one player fires a weapon, I suppose that info is transmitted to the other computers. But who decides who's shot or not? The receiving computer? Wouldn't it be easy to just hack the game and ignore such checks? Or what if it's the other way around, some computer tells another one that it has been hit. Can't it just tell all its opponents that they've been hit? (Again, wouldn't the receiving computers be able to ignore it?) Can someone explain exactly how these things work?

Sponsor:

#2 Rycross   Members   -  Reputation: 576

Like
1Likes
Like

Posted 13 November 2009 - 10:29 AM

They're not peer-to-peer in the technical sense. They actually use a client-server network architecture. However, there is no authoritative server. Rather, one of the players' XBox is picked to be the server. A lot of gamers refer to this as "peer to peer," because there is not a dedicated server, but the logical network topology is still client-server.

#3 Ravyne   Members   -  Reputation: 2917

Like
0Likes
Like

Posted 13 November 2009 - 10:30 AM

These games are not peer-to-peer, they simply don't use a dedicated, fulltime server.

This is because Xbox live, in terms of matchmaking, is just that -- a matchmaking service. They provide functionality to find other players, but once the game begins one of the players (hopefully the one with the best connection to the rest of the players) is chosen to be the server.

I'm sure you've heard of players in these games saying that they "got host" -- this means they were chosen as the server, and its a big advantage because there is no discrepancy between what they see, and what the "real" state of the game is.

The big difference between client-server and peer-to-peer is that in the former, one machine has the absolute, authoritive say about the way things are. In general, this is good for security because only a corrupted server can affect the gameplay negatively. In peer-to-peer, this state is not located in any one machine -- it is typically either shared amongst peers who control "domains" of the game, or it is replicated across machines (sometimes in a voting arangement). In general, security is more difficult in peer-to-peer setups because any single corrupt client negatively effects the gameplay experience, and no other single peer has the authority to correct the "real" state of the game, nor to boot the problem player.

#4 bleabox   Members   -  Reputation: 100

Like
0Likes
Like

Posted 13 November 2009 - 02:39 PM

Ah, I see. Thanks for the clarifications.

Quote:
Original post by RavyneI'm sure you've heard of players in these games saying that they "got host" -- this means they were chosen as the server, and its a big advantage because there is no discrepancy between what they see, and what the "real" state of the game is.


I wonder how competitive gaming is handled if this is the case. I don't know about xbox live because I don't play there, but in the pc game communities I know of, the attitude towards latency is that everyone should have the same or as close to the same as possible. Playing at the same conditions is essential. I really don't see how that could work if one player has the huge advantage of owning the state.

#5 Ravyne   Members   -  Reputation: 2917

Like
0Likes
Like

Posted 13 November 2009 - 03:07 PM

Well, you're right that this means that the playing field isn't absolutely level, but this is nothing new.

PC games aren't always running on dedicated servers either, you know. Many PC games give you the option to host a game on your own PC, even while you're playing. Its another bit of luck when you aren't hosting, but perhaps you've got a really good connection between yourself and the host -- say the host is in your general area and using the same ISP -- granted your experience isn't going to be as flawless as his, but its certainly going to be better than a player who's located half-way across the country or worse.

The network means that every player has a different experience, and it wouldn't be a good idea to lock everyone into the lowest common denominator, or even the average denominator, artificially unless you want to lose customers in a hurry.

This is why real competitions are always held in a LAN environment -- even there things are not 100% perfectly balanced, but the idea is that on a fast, closed network that things never diverge/delay enough to make a difference.

#6 Tsume   Members   -  Reputation: 100

Like
0Likes
Like

Posted 05 March 2012 - 04:08 PM

I came across this topic so I feel there is no need to start a new one.

Just some questions. Does this mean the system which x-box uses still contain problems which face dedicated servers as well? By this I mean that if the elected server was somehow to drop out the whole game session would end.

Are there limits to how many clients can join the game? If I recall Modern Warfare has a max of 18 players but what if the broadband speed of the elected server can only handle up to 10 clients before issues such as lag start. Will the server allow there to be more than 10 clients or will it know when to cut off the amount of players? (Most of my gaming is LAN based so I'm not sure if this holds true xbox live games)

Is there any documentation which I can read up one how the matchmaking system selects a server and what protocols are used for x-box online games?

#7 hplus0603   Moderators   -  Reputation: 3376

Like
0Likes
Like

Posted 06 March 2012 - 08:41 PM

if the elected server was somehow to drop out the whole game session would end.






If the game does not implement host migration, then that would happen. However, most games do allow host migration. I've seen this many times: Every once in a while, when playing Modern Warfare, the game might stop, and a host migration will happen, and then the game will start up again.


enum Bool { True, False, FileNotFound };

#8 Madhed   Members   -  Reputation: 1263

Like
0Likes
Like

Posted 06 March 2012 - 09:10 PM


if the elected server was somehow to drop out the whole game session would end.


If the game does not implement host migration, then that would happen. However, most games do allow host migration. I've seen this many times: Every once in a while, when playing Modern Warfare, the game might stop, and a host migration will happen, and then the game will start up again.



Usually when some frutrated kid gets angry and pulls the cable... ;)

I found a nice presentation about halo 3 matchmaking. It talks more about the skill balancing of player however. http://www.bungie.net/images/Inside/publications/presentations/gdc2008_butcher_chris_matchmaking.ppt




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS