Advertisement

How does the networking of Warcraft 3 work?

Started by July 13, 2005 01:18 PM
8 comments, last by GameDev.net 19 years, 7 months ago
Could anyone provide a link to some article or explain himself how the networking of Warcraft 3 works? Thanks.
What do you mean by.. how does the networking work? The protocol it uses?
Advertisement
Quote:
Original post by Saruman
What do you mean by.. how does the networking work? The protocol it uses?


It doesn't appear to be a clear client/server model since netsplits can occure. Is it p2p or does another client take over the server-role when a netsplit occures? And what is the server (creator's) role?
This is all conjecture based on having played the game casually a few years back:

It's clearly a client/server model, because one player "hosts". It's probably also an input-synchronous model, similar to the "1500 archers" model described in the gamasutra article pointed at by the Forum FAQ.

It's likely that they attempt to handle the failure of a lost hosting machine by electing a new server -- that should be possible, as all machines know the full state of the game at step T by the network model. They use TCP for this reason -- they'd rather lag than evolve the simulation out of sync and have to correct.

When you have a distributed election system that has to face arbitrary node failure, game splits can happen, depending on the failure mode.
enum Bool { True, False, FileNotFound };
Quote:
It's clearly a client/server model, because one player "hosts".


Just because one player "hosts" does not necessarily mean that the network architecture is a client/server model. This simply means that the "host" gets to decide the rules of the game. In theory, p2p could work just as well as client/server since, as stated, all machines know the full state of the game at step T.

I do not know for sure what method WC3 uses, though if memory serves, I read a while back that Starcraft used a p2p model.
For custom games the player hosts the game but it goes through b.net (i think). B.net dosn't pick up hosting but if it can find another host when the original one goes down it'll go off that one.
Advertisement
I have been thinking long an hard about a p2p transport layer for a game network. The problem I keep running into is latency. If you have 100-200 ms delay between nodes you cant go through alot of nodes before latency becomes a issue. To reduce the number of hops i am always increasing the number of connections the nodes can have. Personally i think there must be a fine balance between number of connections and latency to make p2p game network work well.

If I am missing something stupid let me know.
Quote:
Original post by BlueHabu
I have been thinking long an hard about a p2p transport layer for a game network. The problem I keep running into is latency. If you have 100-200 ms delay between nodes you cant go through alot of nodes before latency becomes a issue. To reduce the number of hops i am always increasing the number of connections the nodes can have. Personally i think there must be a fine balance between number of connections and latency to make p2p game network work well.

If I am missing something stupid let me know.


No, I think this is the problem with p2p systems. If there's a hop, there's latency. I don't see how that can be avoided. I don't think the client/server paradigm for games is going to go anywhere for a long while. In addition to the latency problem, you also have a problem with firewalls and NATs disallowing incoming p2p connections.

This topic is closed to new replies.

Advertisement