[sldev] movement within the client

John Hurliman jhurliman at wsu.edu
Mon Dec 31 19:33:19 PST 2007


Callum Lerwick wrote:
> On Mon, 2007-12-31 at 15:06 -0600, Argent Stonecutter wrote:
>   
>> On 2007-12-31, at 14:06, Callum Lerwick wrote:
>>     
>>> (And of course we can and should always ask the question, "How does
>>> Quake 1/2/3, Doom3, HL 1/2, Unreal etc etc game engines handle this?",
>>> they've been doing this for years... AFAIK a major difference is they
>>> all perform collisions/physics simultaneously on the client and  
>>> server,
>>> and resolve any de-synchronization by holding the server  
>>> authoritative.)
>>>       
>> Would that require making Havok part of the client code?
>>     
>
> Good question, actually. I'd like to know how Doom3 (Which is apparently
> "id Tech 4" now) and Source handle this. Do all clients really perform
> full physics simulation? Is the physics simulation predictable enough to
> do this on large numbers of colliding objects? The Source engine is
> Havok based, actually. However John Carmack has to reinvent the wheel as
> usual.
>
> Still, full client prediction of physics is orthogonal to the
> functionality I/we want. Better client prediction would be nice. The
> "fall through the ground then suddenly pop backwards" thing that happens
> in laggy situations, especially when crossing sims, especially in
> vehicles, is really annoying and I don't even understands why this
> happens. Is the client simulating gravity? As well as the "walk forever"
> thing that happens. The client does not seem to have any code in it that
> does something like "I have not received any updates from the sim in x
> seconds/milliseconds, I should stop moving the avatar as it is likely
> not what is intended by the user".
>   

Second Life clients use http://en.wikipedia.org/wiki/Dead_reckoning 
based on position, velocity, acceleration, angular acceleration, and an 
attempt to synchronize time steps between the client and the sim. If you 
jump in the air and then start falling down or you stop flying and the 
sim hiccups in sending you position updates, or you are crossing a 
border at the time and the handover goes less then seamlessly you will 
probably start falling through the earth. The client *could* do basic 
collision detection with the avatar and the terrain heightmap to prevent 
this effect.

John


More information about the SLDev mailing list