I'm personally developing a massive multiplayer server for the FPS game genre. (Ex: such as battlefield series or call of duty series) In general, people usually use a server and client structure to prevent client data manipulation(such as memory cheats). so the server can check user data whether it is legit or not.
However, the above case has a data traffic issue. For example, a large number of users (100 or more) connect to the server and exchange data with server every seconds. The amount of data will grow enormously. Also, the server has to send updated player data to all other users. As the amount of traffic increases, the cost of the service will be increased as well.
Therefore, In my opinion, users share real-time game data using a peer-to-peer method using UDP or other protocols. And user data validation should be done by a dedicated server.
For example:
- Total Player counts : 100
- Interval time of the scen update: 20 milliseconds
- Number of scenes in a second: 50
- Data size of the every scene: 64 byte
If server collect all user scene data and send back to all other users
- Server side inbound data per second = (Numer of users) X (Data size of the scene) X (Number of scenes every second) = 312.5 KByte
- Server side outbound data per second = ((Numer of users) X (Data size of the scene) X (Number of scenes every second)) X (Numer of users) = ((100) X (64byte) X (50)) X (100) = 32,000,000 byte = 30 MByte/sec => 75 TByte/month
Dedicate server only validate user data in every second
- Server side inbound data per second = (Numer of users) X (Validation Data(64byte)) = 6.25 KByte
- Server side outbound data per second(send validation result to each player) = (Numer of users) X (Validation Result(64byte)) = 6.25 KByte/sec => 15 GByte/month
If the server control all user data then server traffic will be massive. however, if the server only checks the validation data then traffic size will be acceptable.
I wanna know above idea is really used in this game business. and If the people are using the above structure how do clients share data? (like p2p using UDP socket??)