Blender Git Loki

Git Commits -> Revision 672492f

Revision 672492f by Benoit Bolsee (master)
May 1, 2009, 16:35 (GMT)
BGE: New function GameLogic.setMaxLogicFrame() to allow better control over the time spent on logic.

This function sets the maximum number of logic frame executed per render frame.
Valid values: 1..5

This function is useful to control the amount of processing consumed by logic.
By default, up to 5 logic frames can be executed per render frame. This is fine
as long as the time spent on logic is negligible compared to the render time.
If it's not the case, the default value will drag the performance of the game
down by executing unnecessary logic frames that take up most of the CPU time.

You can avoid that by lowering the value with this function.
The drawback is less precision in the logic system to physics and I/O activity.

Note that it does not affect the physics system: physics will still run
at full frame rate (actually up to 5 times the ticrate).
You can further control the render frame rate with GameLogic.setLogicTicRate().

Commit Details:

Full Hash: 672492f563e148dc608965c5d0011413fbfae0eb
SVN Revision: 20019
Parent Commit: 1c6cd47
Lines Changed: +135, -84

13 Modified Paths:

/source/gameengine/Ketsji/KX_KetsjiEngine.cpp (+25, -6) (Diff)
/source/gameengine/Ketsji/KX_KetsjiEngine.h (+9, -0) (Diff)
/source/gameengine/Ketsji/KX_PythonInit.cpp (+17, -0) (Diff)
/source/gameengine/Physics/BlOde/OdePhysicsEnvironment.cpp (+1, -1) (Diff)
/source/gameengine/Physics/BlOde/OdePhysicsEnvironment.h (+1, -1) (Diff)
/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp (+60, -69) (Diff)
/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h (+1, -1) (Diff)
/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h (+1, -1) (Diff)
/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.cpp (+1, -1) (Diff)
/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h (+1, -1) (Diff)
/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.cpp (+1, -1) (Diff)
/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.h (+1, -1) (Diff)
/source/gameengine/PyDoc/GameLogic.py (+16, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021