[ODE] Networking (Client-Side Prediction)
Hampus Soderstrom
hampus at sxp.se
Wed Apr 26 20:52:20 MST 2006
Hi Bruno,
To be absolutely sure that the game world is persistent setting FPU
state is not enough.
Periodically sending complete world states and have the clients
resync is a must I think.
/Hampus
27 apr 2006 kl. 06.01 skrev STenyaK (Bruno Gonzalez):
> I'm most interested in this issue. Unfortunately i can't help at
> all with
> it (yet, and prolly for at least 1 or 2 more years... my sim is
> still to
> yound and it's a spare time project).
> Please write any interesting info in the wiki, i can help
> reformatting it
> there... or whatever. It's not much, i know, but i'm afraid that's
> all i
> can do for now... Maybe i can test things for you, if it doesn't take
> "much" time: i have 5 computers at home, with 5 different OSs, half
> Pentium (PI, PIII), half AMD (1700XP, 3000Barton, 3200XP). Simply
> let me
> know if i can help with anything.
>
> On Thu, 27 Apr 2006 00:30:48 +0200, Jon Watte (ODE)
> <hplus-ode at mindcontrol.org> wrote:
>
>
>>
>> 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
>>>
>>>
>>>
>> _______________________________________________
>> ODE mailing list
>> ODE at q12.org
>> http://q12.org/mailman/listinfo/ode
>>
>>
>
>
>
> --
> Saludos,
> STenyaK
>
> _______________________________________________
> Site: http://1ksurvivor.homeip.net <1kSurvivor>
> http://motorsport-sim.org <Motorsport>
> http://kwh.iespana.es <KuantikalWareHouse>
> http://emuletutorial.info <EmuleTutorial>
> ICQ: 153709484
> Mail: stenyak AT gmail DOT net
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
>
More information about the ODE
mailing list