Originally Posted by Karriz
I'm a bit worried about bandwith usage. 64, even 128 players is all fine on my 1mb connection, but what about 2000? Is player data sent from the whole continent area?
|
First off, the bandwith required for each user on the map is not too much. For simplicity, allow me to consider the case where the connection is 1MB (not 1mb). Even if you had all of those 2000 players sending you 10 packets a second, that means each packet could be over 50 bytes. (lets say 3 longs for the XYZ coordinates [~3*8=24], then velocity vectors: 3 shorts [~3*2=6], then an id for the animation (reloading, crouching, jumping, etc) [2 bytes], then an unique ID for the weapon customization code (includes both the gun and the camo pattern)[4 bytes], then an unique id for the armor/vehicle(dictates the class as well) [2 bytes], an id for the weapon loadout [2 bytes], a list for the player customization specifics, assume at most 5 properties: [~2*5=10 bytes]
Total packet size: 24+6+2+4+2+2+10=
50 bytes.) So it is plausible that even with 2000 people sending you packets at a reasonable rate the 1MB bandwidth would be able to handle it. Of course you could send packets for people nearby more frequently than people far away. You could also have multiple packet sizes for people far away vs. close up, where the far away ones will be just an XYZ, Velocity, and an armor but not customization details.
Admittedly, I have not taken into consideration the projectiles, but hopefully it shows you that 2000 people is certainly plausible on a 1MB connection. Now considering your 1mb connection, which is probably more common than an 8mb (1 Byte = 8 bits) connection, we can have the following optimization: Every 10 packets (assuming uniform distribution of when the 10th packet occurs for a given person) we send all of the customization details with the location/direction details, and include a unique id for each player, then we can store the customization details in-memory on the client for each person, which will be updated once a second. Thus, roughly speaking, we have a plausible netcode that will work quite well on your 1mb connection that can support 2000 people running around.
Furthermore, it has been said multiple times that the game uses modern netcode including only sending what you need. I think it was said by Higby that for example, the number of gernades a player has on his vest won't be sent to you until he is really close. Likewise a cloaker that should be 100% invisible won't even be sending you packets at all.
Of course the details of their implementation change, but you can be sure that they are not going to do something stupid like indiscriminately sending data for all the players on the server to everyone.
It was also said that if for some reason there were to be 1000 people standing in a room that it
would lag. That is why they have the mission system in place to keep the battle spread out for the most part. (of course, this means while normally the battle will be spread out, sometimes we will get an insane concentrated battle) Also, I don't think any of us here even have an idea of just how many people 1000 players looks like. In PlanetSide, a group of 30 people in the Lobby of an interlink was INSANE.
We also should realize that there have been better algorithms developed for certain computational geometry and similar problems within the rather recent past. Some of these make a big difference in terms of efficiency. It would be cool to hear if there are any really neat algorithms being used that were not around when PS1 was developed. My guess is that there are and that the result is a significant performance boost.