Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question
1  
"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
add comment

2 Answers

up vote 2 down vote accepted

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)

share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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.