[ODE] networking
Nate W
coding at natew.com
Wed Oct 16 23:20:02 2002
On Wed, 16 Oct 2002, Eric Cha wrote:
> A better way (for physics) to do things would be to designate one
> computer as "the physics simulator". Do the entire scene simulation on
> that computer, and then just transmit position/orientation/velocity
> updates to other computers. Of course, other computers would transmit
> user inputs (or even impulse/velocity/acceleration changes) to the
> simulator computer to control their respective robot.
I hope you all don't mind too much my attempt to hijack this thread and
turn it into a discussion of networked physics in general. :-)
Having a single computer be "the" simulator solves a lot of problems, and
in many cases would be the best solution. A co-worker and I did a
multi-user simulation this way a few years ago and it worked well. (We
didn't have physics to worry about, but we did have related issues with
maintaining coherent world states on all of the 'client' machines.)
The thing that makes me want to avoid that model today is that physics
takes a lot of CPU power. Every client brings a fast CPU to the party...
if there's a way to make use of that power, many clients together could be
able to do much more complex simulations than a single server (or rather,
"more complex that the server *I* can afford"). Ideally, it gets a lot
cheaper to scale the system to support more users, becase each user brings
enough CPU power to do their share of the computation. Practically it
will never be quite that scalable, but I still like the idea.
If you can have each client simulate the parts of the player's body or
vehicle, then broadcast the positions and orientations, the server's CPU
requirements go down quite a bit. Note that I'm assuming a game sort of
paradigm here, but other scenarios could use other methods of assigning
objects to CPUs.
I'd elaborate, but I see that Anselm has already described something like
what I had in mind, only better. :-)
--
Nate Waddoups
Redmond WA USA
http://www.natew.com