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

Consider Starcraft 2, given that Battle.net 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 Battle.net know who was the winner in the end. Relying on the two peers to not try to cheat and report accurate results is naive.

  • 2
    \$\begingroup\$ "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. \$\endgroup\$ Commented May 18, 2012 at 18:54
  • 1
    \$\begingroup\$ 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... \$\endgroup\$ Commented May 18, 2012 at 21:04

2 Answers 2


If I remember correctly, SC2 actually isn't peer-to-peer; it's client-server with Battle.net (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)


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.


You must log in to answer this question.

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