[ODE] simulation steps in a game

Nate Waddoups nathan at whatever.net
Thu Apr 11 17:05:01 2002


On Fri, 12 Apr 2002 henry.maddocks@met.co.nz wrote:

> Here's my render loop... [simplified for brevity]
> 
> void render( float gameTime) // milliseconds
> {
> 		while( physicsTime < gameTime)
> 		{
> 			odeWorld->step( ODE_WORLD_STEP);
> 			physicsTime += ODE_WORLD_STEP;
> 		}
> 
> 	scene->render( gameTime);
> }

But what if the processing for a single odeWorld->step takes significantly
longer than gameTime?  That's the condition in which my app slows down,
which as someone pointed out the other day is going to be a problem in
a multiuser situation.

Does anyone have any ideas for handling that condition?  The first thing
that comes to mind is "don't let the world get that complex" but in my
application that's not an option.

-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com