[quote:1ejnci41]The number of player in each room depends on the host connection
Sorry, I must be missing something - I am probably just confused but I thought from previous discussions you didn't want a player to be the host ("I don't want to use a player as the host"). So why would it depend on anything else than the infrastructure and bandwidth you provide
Server is host, player(s) are peers, but server can handle 100+ peers connected. BUT, peers can only handle 15 other peers connected because host collects info from peers and broadcasts to peers and peers broadcast to peers via host...
Just as example for simplicity.
if peer is running a 1mb/s line his upload is 100kb/s and download is 1mb/s
He has to send data to host and recieve data from host and peers how much data can he send/receive?
[quote:1ejnci41]How many players can join the same game?
The limit on how many players can join a game is likely to be the upload bandwidth on the host. The engine itself imposes no limit, but there is definite practical limit that will be encoutnered.
The problem is the host has to send a message with data for N players, to each of the N players. For example, if the host needs to send 16 bytes of data for each player, then each message will have a size around N * 16, and then that message will have to be sent N times. This creates an N-squared bandwidth requirement. For example:
10 players = 16 x 10 x 10 = 1600 bytes per update
20 players = 16 x 20 x 20 = 6400 bytes per update
30 players = 16 x 30 x 30 = 14400 bytes per update
100 players = 16 x 100 x 100 = 160000 bytes per update
Even though the player count increases linearly, the bandwidth requirement increases proportional to the square. This means even with a significantly more powerful server or less data needed per-player, it won't get you many extra players.
By default updates are sent 30 times a second, so the last example with 100 players would actually require an upload rate of about 5 megabytes/sec (or 40 megabit/sec). This is pretty high for a home connection, but not necessarily a dedicated server.
On top of that the host needs to be able to run the game for a large number of players as well, performing tasks like lag-compensated collision tests, which can be CPU-intensive. Then it may need to be rendering the game for the host if they are a participant as well. Generally the overall amount of work increases quickly with the number of players, and although it depends on the specific game and connection, it's rare to get close to 100 players in one game.
Note: updates sent 30 times per second.
So 100 players would require an upload rate of 5mb/s when a 1mb/s line only has upload of 100kb/s. OOPS!
Sorry I got posted over....
But host(server) can host multiple game sessions with 15 peers in each lobby. Because the bottleneck won't be the host, it will be the peers restrictions.