I have made a FPS game reccently.The most import characteristic is
that its Server is running on 5 PCs.So more than 100 players can
easily play on ONE map simultaneously.Bullet on ervery sub-server
(PC) just provide calculations for Raycast and Bomb&Wall collison
detection.Because the player just attack another guy by Shooting
or throwing a bomb.Shooting can be easily implemented by Raycast
of Bullet, and Bomb&Wall collison detection as well.
Every sub-Server can hold more than 20 players.It receive and
process action data(KeyBoard&Mouse message) from player-clients
connected.Every player-client can receive all game-state data
(player's state action,bomb movement)from all sub-Servers and
these data are tansmitted through UDP protocol. So 3D-Rendering
Engine of every player-client can render the entire game.If one
Player connected to A sub-Server shoot another guy on B sub-
Server, A sub-Server just need send a Shoot Message(including
shoot-from point(btVector3 type),shoot-to point,who shoot,hurt
power etc) to B sub-Server.Therefore,B can get adequate data to do
a simple Raycast.Generally,2 bombs of different sub-Server will
have rare collision,so I just do Bomb&Wall collison detection on
every sub-server.
The communication delay is the bottleneck.And data transmission
between sub-Servers will increased as player's Number becomes
bigger.It's a big problem .
Parrallel-Version FPS game based on Bullet
-
- Posts: 21
- Joined: Mon Oct 22, 2007 12:47 pm
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Parrallel-Version FPS game based on Bullet
That sounds interesting, networked collision detection. Do you have a link or further info?michaelth wrote:I have made a FPS game reccently.The most import characteristic is
that its Server is running on 5 PCs.So more than 100 players can
easily play on ONE map simultaneously.Bullet on ervery sub-server
(PC) just provide calculations for Raycast and Bomb&Wall collison
detection.
How many packages of data are send, and how many bytes?The communication delay is the bottleneck.And data transmission
between sub-Servers will increased as player's Number becomes
bigger.It's a big problem .
Thanks,
Erwin
-
- Posts: 21
- Joined: Mon Oct 22, 2007 12:47 pm
Re: Parrallel-Version FPS game based on Bullet
Networked collision detection has not been implemented completely in my program.Because the servers just do Networked raycast.And the bomb&wall collision detection will be done on every sub-server.If shooting and throwing bombs between different sub-servers increases greatly,the server-server UDP packets will increases greatly as well while sub-server also process packets from clients connected.So that's why I say The communication delay is the bottleneck.Erwin Coumans wrote:That sounds interesting, networked collision detection. Do you have a link or further info?michaelth wrote:I have made a FPS game reccently.The most import characteristic is
that its Server is running on 5 PCs.So more than 100 players can
easily play on ONE map simultaneously.Bullet on ervery sub-server
(PC) just provide calculations for Raycast and Bomb&Wall collison
detection.
How many packages of data are send, and how many bytes?The communication delay is the bottleneck.And data transmission
between sub-Servers will increased as player's Number becomes
bigger.It's a big problem .
Thanks,
Erwin
For every second of the game,i assume there are 100 frames passing.In this second,the total communication data that one sub-server need to process consists of 3 part.
First part.In every game frame ,every sub-server firstly broadcast update message(include all connected players's state data(100 byte per player)) to all clients.100*100*20=200K
And meanwhile,20 players on every client send action data to server,the number of total data is unsure. I assume that every player moves and shoots uninterrupted.I don't know how many times my keyboard and mouse samples in 1 second. Assume it 100,so the total action data that one sub-server will receives in 1 second is :100*10*20*5=100K
The last part.I assume in 1 second,the sub server receive 100(mouse sample rate)*80(other 80 players)shooting message from other sub servers.The total data is: 100*80*20=160K.
So the total data per second is 460K.And I think there will be a good algorithm to reduce the total data.