Bullet determinism

spenen
Posts: 6
Joined: Wed Jul 23, 2008 9:21 pm

Bullet determinism

Post by spenen »

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
User avatar
projectileman
Posts: 109
Joined: Thu Dec 14, 2006 4:27 pm
Location: Colombia

Re: Bullet determinism

Post by projectileman »

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.
spenen
Posts: 6
Joined: Wed Jul 23, 2008 9:21 pm

Re: Bullet determinism

Post by spenen »

Ah ok. Thanks!
Wavesonics
Posts: 71
Joined: Thu May 22, 2008 8:03 pm

Re: Bullet determinism

Post by Wavesonics »

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.