[ODE] Networking (Client-Side Prediction)

Jon Watte (ODE) hplus-ode at mindcontrol.org
Wed Apr 26 15:30:48 MST 2006


Perhaps the client uses a DLL (such as Direct3D) that changes the FPU 
precision or rounding mode? I've found that you must verify that the FPU 
internal precision is set to your chosen bits mantissa and the rounding 
mode is set to your preference, before each simulation step (or any math 
that affects body state).

Also note that AMD and Intel machines have different FPU hardware (Intel 
can go to 80 bits doubles internally; AMD stays at 64 bits). Again, 
setting the precision mode explicitly fixes this problem most of the time.

The networking forum at www.gamedev.net discussed these issues at length 
  sometime last year, if you want to go archive spelunking.

Cheers,

			/ h+


Robert Pröpper wrote:
> Hi,
> 
> I am trying to program a multiplayer game using ODE (float version). 
> I've got many things running already, most important to this question is that I can jump to a previously saved state, simulate the intermediate steps again and arrive at EXACTLY the same result.
> I have now begun to build a Client-Server System. The client sends only his Inputs(with a timestamp) to the server. When he receives an Input, the server jumps back to the tick where the input happened and re-simulates. Now, since I can get the same results from the same starting conditions in my "Single Player" application, I would expect that the server also arrives at the same results, but this is not the case.
> 
> For example, I have turned off gravitation in my application. As long as no force is applied to my body, the client and the server stay perfectly in sync (obviously, neither the position nor the rotation changes). They also stay the same if I apply a force at
> the center of the body (like gravitation) - I get a linear velocity and the positions stay the same (the rotations again don't change). Now, as soon as I apply a force at any other point than the center, the two simulations go out of sync. 
> For testing purposes, I only apply the force for 1 step. Immediately, the client and the server rotations are very slightly off - in the order of 1e-8.
> I can't explain this, I have followed all the Save and Restore FAQ and, as I mentioned, have no problems in the same application or until the body begins to rotate. For a good client-side prediction, I need the server and the client to arrive at the exactly same results, so this inaccuracies are a big problem for me.
> 
> So, do you have any ideas what could be causing this problem, or even better, how to solve it?
> 
> 
> PS: For the moment, both the client and the server run on the same computer.
> _______________________________________________________________
> SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
> kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192
> 
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
> 
> 


More information about the ODE mailing list