Substeps and performance: game logic in tick callback.
Posted: Tue Dec 23, 2014 1:56 pm
Given a call like stepSimulation(delta, 7), where delta is 1/60f, I assume that there would be only one substep, and if I'm running my game logic in the simulation tick callback, that logic would only run once for this frame.
However, if I start doing something fairly expensive in my game logic, and the frame rate drops as a result, that delta would be higher on the next frame, and bullet would run multiple substeps on the next frame, which would in turn execute that expensive game logic more than once per frame, which would lower the frame rate, which would run more substeps, and so on, until I pass over maxSubSteps, at which point I start loosing time.
Is that correct?
However, if I start doing something fairly expensive in my game logic, and the frame rate drops as a result, that delta would be higher on the next frame, and bullet would run multiple substeps on the next frame, which would in turn execute that expensive game logic more than once per frame, which would lower the frame rate, which would run more substeps, and so on, until I pass over maxSubSteps, at which point I start loosing time.
Is that correct?