2
$\begingroup$

I am evolving A.I. and I need to run blender as fast as possible, somewhere around 400-600 FPS, but when I increase FPS in World > Physics section it increases both number of logical steps and physics steps while decreasing size so physics steps Δt so physics stays same compared to real world time as opposed to staying same compared to logical steps. Is there no way to change Δt of bullet physics other than to go into source code?

What I basically want is to make physics frame-rate dependent.

$\endgroup$
4
$\begingroup$

You can set/reduce the physics substeps, but that only works in reverse (ie 10 physics steps per frame).

But what you may actually be looking for is bge.logic.setLogicTickRate(), so your logic can go faster without increasing frame-rate.


While I have not used them, the API in 2.77 provides some control over time-flow. The one you're probably looking for is bge.logic.setTimeScale(), which allows you to scale the speed of the simulation. Bear in mind that this won't influence physics substeps, so the faster you go, the worse the simulation accuracy will be.

$\endgroup$
  • $\begingroup$ I don't think you understand what I need. I need physics to be not frame rate independent. I'm not a game engine expert but when I was learning irrlicht engine it had something like this, in every frame there was a timer that calculated time passed from one frame to another so that would be taken as delta t to make framerate independent physics/motion so no matter if frames (together with logic) are ticking 5 times per second or 1000 times per second motion/physics would appear at same speed for a player. I want to disable that. $\endgroup$ – Alex Azazel May 21 '16 at 23:50
  • $\begingroup$ I've updated my answer to include information about time manipulation. You can disable physics substepping, but I don't think it will do what you want: blender.org/api/blender_python_api_2_77_release/… $\endgroup$ – sdfgeoff May 22 '16 at 3:23
  • $\begingroup$ Documentation says 'Note that a too large value may lead to some physics instabilities.' that means it increases Δt, exactly what I need. Thank you very much. $\endgroup$ – Alex Azazel May 22 '16 at 13:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.