Collision on a Client/Server system - practical?
Posted: Fri Dec 19, 2008 8:33 am
Hello,
I've been tinkering with bullet for a while now. It works very well on a single local system.
I've seen a few other posters who have similar problems to this, but I thought I'd start a new thread to discuss some situations and possible solutions.
Situation:
Server AND client both run btDiscreteDynamicsWorlds. Server provides corrective updates to client, which does an immediate warp of position and linear/angular velocities.
Problem:
Collisions produce unpredictable results. Updates from server contradict local physics predictions causing heavy warping and objects jitter heavily, taking time to settle down.
Solution 1:
Turn off collisions on client. Still use physics engine on client to move players smoothly. Rely on server to correct after collisions - Susceptible to lag I assume.
Solution 2:
Turn off collisions on server. NO! Server is always right!
Solution 3:
Turn off all physics for players on Server. Instead add validation code for all player movement.
Love to hear your thoughts on these ideas....
Thanks
Simon
I've been tinkering with bullet for a while now. It works very well on a single local system.
I've seen a few other posters who have similar problems to this, but I thought I'd start a new thread to discuss some situations and possible solutions.
Situation:
Server AND client both run btDiscreteDynamicsWorlds. Server provides corrective updates to client, which does an immediate warp of position and linear/angular velocities.
Problem:
Collisions produce unpredictable results. Updates from server contradict local physics predictions causing heavy warping and objects jitter heavily, taking time to settle down.
Solution 1:
Turn off collisions on client. Still use physics engine on client to move players smoothly. Rely on server to correct after collisions - Susceptible to lag I assume.
Solution 2:
Turn off collisions on server. NO! Server is always right!
Solution 3:
Turn off all physics for players on Server. Instead add validation code for all player movement.
Love to hear your thoughts on these ideas....
Thanks
Simon