[ODE] Buffered World
Will Thimbleby
will at thimbleby.net
Sat Sep 25 15:34:31 MST 2004
Hi again - thanks for all your help.
I'm trying to use ODE in a thread separate to my drawing. It almost
works, I was using mutexes to keep them apart, but I get lots of jerks
and frames dropping.
I am thinking that the best way to do this is to use a buffered physics
sim. One which runs in a separate thread to the drawing, and runs
accurately with a fixed timestep. And a buffered sim that runs on-top
that runs very fast and inaccurately: this is used to draw. Every frame
the accurate version can update the buffered.
The syncing is then the only thing that needs to be mutexed. This
hopefully should stop my problems, it will be much much faster than a
full physics step, and it is also not critical if it is missed for a
frame or two.
This buffered version needs no contacts or forces or physics other than
a simple linear interpolation of positions, which can be processed in
the graphics update thread using a variable timestep (VBL).
What is the best way to do this and is it a good idea? What is the best
way to create a world and do as little calculation as possible in the
physics step. Or is it best for me to buffer the objects myself, and
write the linear interpolation?
many thanks --Will
More information about the ODE
mailing list