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 server can check user data whether it is legit or not.
However, 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. Amount fo data will grow enourmously. Also server has to send updated player data to all other users.
As the amount of traffic increases, the cost of the service will be increaed 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.
- 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 server control all user data then server traffic will be massive. however if the server only check the validation data then traffic size will be acceptable.
I wanna know above idea is really using in this game business. and If the people are using above structure how clients share data?(like p2p using UDP socket??)