Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A typical RTS game is implemented with the standard networking model: peer to peer lockstep.

Consider Starcraft 2, given that presumably doesn't know anything about the state of game given that there is only communication between the two players in a peer to peer model, how does know who was the winner in the end. Relying on the two peers to not try to cheat and report accurate results is naive.

share|improve this question
"Relying on the two peers to not try to cheat and report accurate results is naive." Why? If the two peers disagree, then obviously someone's screwed up. And since only one player can win, if they're reporting the same thing, what does it matter? Two people can cheat, but only one of them can win. – Nicol Bolas May 18 '12 at 18:54
Actually, it gets even more fun. As @Nicol mentioned, as long as the two players agree, the server's not going to bother arguing. You could use this as a basline for establishing a player's basic skill level, as well as their trustworthyness, which could be used to determine the likelyhood of who the disputed win actually belongs to. The server may also ask for replay data, although since you could also lie about that... – Clockwork-Muse May 18 '12 at 21:04
up vote 2 down vote accepted

If I remember correctly, SC2 actually isn't peer-to-peer; it's client-server with (still deterministic lockstep though) so this is a non-issue. In the real world however, getting all peers to agree to some state or the result of some operation ("winner" is certainly shared state in this point) is provably impossible in bounded time. Take a look at the formal proof for the Byzantine Generals problem and also the Fischer consensus problem. This is a decent starting point (look at the citations and read those): Consensus (Computer Science)

share|improve this answer

If all players agree, then that's obviously accurate. Else, the game's state is invalid and nobody "won". However, note that you can use SSL to encrypt communications between BNet and the game client- which obviously must exist, else how can features like in-game chat exist? There's no reason to believe that the clients do not communicate with Battle.NET during a game.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.