Peter Amstutz wrote:
> Since VOS was originally conceived as a peer-to-peer system, we had this
> idea that we could do client-based physics, but that idea quickly breaks
> down when you have more than one client applying force to a single
> object.  So it will probably end up being something like server-based
> simulation + client side prediction.

Yeah, any time there's two or more interacting forces not "owned" by the
same node, something has to be the referee. I was thinking a good model for
this in VOS (and what I proposed on the wiki) was to have the "sector"
control the physics of whatever objects or avatars move about within it, and
whichever node owns the "sector" is effectively the server. (But of course,
I could run a sector object off of my own PC and invite other people into
it, assuming my firewall/NAT is ok with it.)

Of course, peer-to-peer "shared" sectors may be an interesting feature to
have as well... and could have some use for impromptu meetings between small
groups of people without needing a server ... but you won't be having any
physics simulation going on within them.

> Prediction may be as simple as
> sending linear/rotational velocity and extrapolating from that, perhaps
> with collision detection so people don't appear to run through things...

I think it's interesting to look at a game like Half-Life 2 as a model.
Here's an environment that hosts a competitive, fast-moving multiplayer game
with full dynamic physics over the internet. Yes, if you have too much lag,
you see lots of "snapping," but for the most part it's not too bad. One
interesting decision they made is that they don't do any "extrapolation" of
the movement of other players and objects (player motion in an FPS are
notoriously hard to predict, and objects are often affected by the players
as well). They simply display them at the last location they heard from the
server (well, they interpolate between the last two positions, which
effectively adds a bit more lag). But the client itself is predicted, and so
all other objects and players are seen quite a bit "behind" where they
actually are according to the server -- how much depends on lag. (They then
try to compensate for this on the server so that if you "shoot" at where you
see another player to be, it will still register as a hit, even though the
player is actually past that spot.... but I don't think this behavior is
really applicable to VOS).

Interesting history: DOOM networking was purely peer-to-peer. Quake was
client-server, but without prediction, so you saw things happen a
round-trip-time after you pressed a button. Quakeworld (and pretty much all
multiplayer 3d games afterward) implement client-side prediction. I'm not
sure if HL2 is the first game to implement lag-compensation or not, or to
implement dynamic physics in multiplayer....

>
> One thing I've come to realize is over the Internet lag is often so bad
> that close synchronization is impossible and the best you can do is make
> it look good on each client and just hope it's close enough.

I'd imagine that most physics is for fun/immersion purposes, anyway. Any
serious need for multiple people to interact with the same object should
implement a more robust locking mechanism.

>
> On Thu, Feb 22, 2007 at 08:41:09PM -0800, Ken Taylor wrote:
> > For some reason I got physics on the brain this week, so I kinda went
> crazy
> > and added a bunch of thoughts to
> > http://interreality.org/cgi-bin/moinwiki/moin.cgi/PhysicsInVos ...
mostly
> > about client-side prediction, intended-movement representation, and
using
> > access control permissions to enforce a sector physics simulation.  I'm
no
> > physics simulation expert by any means, and I still have a lot to learn
> > about VOS, but I got a good picture in my head of how VOS physics could
> work
> > themselves out. I was inspired by http://www.gaffer.org/game-physics/
> > (especially the article on network physics) and
> > http://developer.valvesoftware.com/wiki/Lag_Compensation ... feel free
to
> > comment/criticize/refactor/ignore :)
> >
> > -Ken
>


_______________________________________________
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d

Reply via email to