Peter Amstutz wrote:
> VOS s3 used extrapolation, sending position, velocity and acceleration
> and seemed to work pretty well, but we never really tested it in cases
> with a lot of rapidly changing motion.  I feel like you should be able
> to get good results from an extrapolation approach using control theory
> and filters (to smooth out network lag and jitter) but there's still the
> common edge case where someone stops, the system over-compensates for
> their motion and then "snaps back" like a rubber band.  I see how
> interpolation is a simpler solution to the problem.

In the back of my mind, I've been using a sort of "rule-of-thumb" that goes
"if it's more complicated than what a modern FPS game does, perhaps we
shouldn't do it that way." Obviously, things that are specific to vos's
object structure and message passing are excepted, but for things like
interpolation, prediction, physics, etc -- why re-invent the wheel?

An example of this I noticed is in the commented-out physics code. It looks
like you were trying to control avatar turns with torques -- most people
don't bother with that! They model their player physics as
cylindrically-symetrical shapes so that turning has to physical meaning,
then they just move the mesh orientation directly with no physics
interaction. Likewise, for keeping players upright, most just force the
rigid body to be upright every frame rather than trying to apply physical
forces. Others, who want a realistic "wobbling" (like for hover-car games or
something) use a spring constraint to keep things upright. Setting velocity
usually uses a spring constraint, too. I haven't looked to closely at ODE,
but it might have a more powerful constraint system, and you might be able
to do things with it rather than manually.

> You're right, VOS is not clocked, due in part to the current
> multithreading design that encourages asynchronous "anytime" execution
> of tasks.  This is something we may need to revisit in the s5 design,
> actually, and I'd be interested to hear your thoughts about it.

Actually, if the VIP already spaces out updates (as you say below), then
that basically accomplishes the same thing as why games do it -- so smooth
movements don't flood the network with updates. A precise timestamp
server-side is something you might want to help assist in client-side
prediction if the physics of the avatar are controlled server-side; but this
is something that could be done at the message level rather than at VIP (add
a new "timestamp" field to position update messages, for instance).

> I
> should note that the VIP low latency protocol used for sending out
> position updates does use a 100ms clock.  Also you might want to compare
> your ICMP ping times with your VOS ping times just to get an idea of how
> much of the variance in latency is inherent in your connection to
> interreality.org.

I get a consistent <100ms... when packets aren't dropped :) So dropped
packets may account for what I was seeing. Or lag on my side in sending
updates to the server (I was running two debug terangreals simultaneously,
which gets a little bogged down.)

> This sounds terrific!  I have to talk to Reed, but since you've shown
> some dedication (and a willingness to wade through the CS plugin code,
> which is pretty much trial by fire) I will probably go ahead and set you
> up to be able to commit to the main branch on interreality.org -- I
> don't know when Reed and I have the time to merge your changes ourselves
> right now, but it would be a terrible shame to let this good work linger
> in the queue.
>

That would be excellent! But I'm surprised you'd trust me without seeing my
code first :)

Actually, if I can make a revision bundle without line-ending problems this
time (and I looked at my previous revision-bundle -- I think it was my
fault), then all you need to do is a "bzr merge kens-revision-bundle" or
"bzr pull kens-revision-bundle" rather than patching everything by hand. So
it shouldn't take too much time, and you can check right there whether I
break your build or not :P

-Ken


_______________________________________________
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d

Reply via email to