|
|
|
|
|
by pierd
985 days ago
|
|
It's possible but it gets complex really quickly. Just running the server in the browser is the easy part ;) Having a selected host on one of the clients (as you mentioned) could potentially work, from network topology point of it wouldn't be much different from hosting a native server on their computer. There is a few cons to this approach: 1. We become limited on that person's uplink. First bottleneck will be bandwidth as they have to send all data to everyone. Secondly it's very difficult to ensure reasonable latency in this setup (it's already difficult with dedicated servers). Thirdly they have to be reachable by all other players (NAT/firewall headaches). 2. We rely on that person's computer and network to be up for the duration of the game session. We could try to migrate game server to another one if there are problems but again this becomes really complex really quickly. 3. Cheating. Not something we are worried at this stage but having a game hosted on one of the player's machines opens it up for abuse and might give a slight advantage to that player (starting with extremely low latency). So that's when we compare running a non-dedicated server on one of the client's nodes. If we were to venture to pure P2P then it brings another set of challenges like state synchronisation. |
|