# Framerate control and physics engines?

But in the game I am writing, I use a third party physics library and the only thing I do to update my physics is call a single function (runSimulation()).

Since I cannot do things like "interpolation" in the above tutorial, how can I make my game runnable in different hardware/at different framerates?

• Are you currently having any problems so far, and do you think the 3rd party physics simulator you are using isn't using all those techniques? (As far as possible) – Roy T. May 25 '12 at 9:26
• Actually in the physics engine source code ,it doesn't use any time variable for calculations – Ashika Umanga Umagiliya May 25 '12 at 9:51
• In that case it might be better to look for another (better?) physics library. Or maybe ask the developers there what they think. Or maybe they expect you to call the runSimulation step exactly every x-miliseconds. – Roy T. May 25 '12 at 10:52

Looks like the SteeringBehaviors library is determining the simulation time by calling System.currentTimeMillis(), so (unless you modify the library) your only option is to call runSimulation() at exactly the right time.