Hi!
We are making a network game with bullet and have some troubles with non-determinism.
It's a game where you control a tank. We have no problem with non-determinism when the tank isn't colliding with anything, but as soon as it does two clients give different simulations.
We have reassured that all packets are recieved, and the fact that elements not using physics are perfectly synchronized.
So I think the problem lies in bullet. I've searched around the forum about determinism and found two things:
- solver->setSolverMode(btSequentialImpulseConstraintSolver::SOLVER_RANDMIZE_ORDER);
Apparently btSequentialImpulseConstraintSolver doesn't have setSolverMode. The post was from 2007 so the api may have changed.
- solver->setRandSeed(x);
I set the same seed for every client, but it still don't seem to work.
We use fixed timestep and always make sure the packets are recieved in the correct order.
Can anybody hint me on how to solve it? I can't find anything about it in the documentation.
Thanks in advance
Bullet determinism
-
- Posts: 109
- Joined: Thu Dec 14, 2006 4:27 pm
- Location: Colombia
Re: Bullet determinism
What I believe is that none of the existing physics engines support determinism. Even Havok.
I think that because they depend on floating point calculations whose could give different approximations between different machines on a network simulation.
So you need to transmit all body states from a server to clients, like Second Life does.
I think that because they depend on floating point calculations whose could give different approximations between different machines on a network simulation.
So you need to transmit all body states from a server to clients, like Second Life does.
-
- Posts: 71
- Joined: Thu May 22, 2008 8:03 pm
Re: Bullet determinism
I think I read some where that Newton was deterministic which would of course be extremely cool. But i have no idea if it's true, and since it's closed source I guess it doesn't help anyway.