Blender Git Loki
Git Commits -> Revision 036ebc5
Revision 036ebc5 by Benoit Bolsee (master) May 21, 2009, 18:10 (GMT) |
BGE: GUI control over frame rate, logic rate, physics rate and physics subrate. Four new buttons in World settings to control frame rate: fps: Nominal frame rate in frame per second. Also sets the physics timestep = 1/fps phys: Maximum number of physics timestep per game frame in case the actual fps is less than nominal. This allows the physics to keep up with real time even if the graphics slows down the game. sub: Fixed number of simulation substeps per physic timestep. Improves the precision of the physics simulation. Useful for fast moving objects for example. log: Maximum number of logic steps per game frame in case the actual fps is less than nominal. This allows the logic system to follow the physics simulation. Upper bound = phys (setting the value higher than phys has no effect). On games with heavy logic system, it is useful to set this value to 1, to keep logic time under control. All these values were already accessible from Python except phys: GameLogic.getMaxPhysicsFrame(): Gets the maximum number of physics frame per render frame. GameLogic.setMaxPhysicsFrame(phys): Sets the maximum number of physics timestep that are executed per render frame. Higher value allows physics to keep up with realtime even if graphics slows down the game. Physics timestep is fixed and equal to 1/tickrate (see setLogicTicRate) maxphysics/ticrate is the maximum delay of the renderer that physics can compensate. phys: integer |
Commit Details:
Full Hash: 036ebc55233241bf9bd8149f855185cfcfb1ab67
SVN Revision: 20326
Parent Commit: d54126f
Lines Changed: +102, -10
9 Modified Paths:
/source/blender/blenkernel/intern/world.c (+4, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+7, -0) (Diff)
/source/blender/makesdna/DNA_world_types.h (+1, -0) (Diff)
/source/blender/src/buttons_shading.c (+13, -4) (Diff)
/source/gameengine/Converter/BL_BlenderDataConversion.cpp (+2, -0) (Diff)
/source/gameengine/Ketsji/KX_KetsjiEngine.cpp (+30, -6) (Diff)
/source/gameengine/Ketsji/KX_KetsjiEngine.h (+9, -0) (Diff)
/source/gameengine/Ketsji/KX_PythonInit.cpp (+17, -0) (Diff)
/source/gameengine/PyDoc/GameLogic.py (+19, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+7, -0) (Diff)
/source/blender/makesdna/DNA_world_types.h (+1, -0) (Diff)
/source/blender/src/buttons_shading.c (+13, -4) (Diff)
/source/gameengine/Converter/BL_BlenderDataConversion.cpp (+2, -0) (Diff)
/source/gameengine/Ketsji/KX_KetsjiEngine.cpp (+30, -6) (Diff)
/source/gameengine/Ketsji/KX_KetsjiEngine.h (+9, -0) (Diff)
/source/gameengine/Ketsji/KX_PythonInit.cpp (+17, -0) (Diff)
/source/gameengine/PyDoc/GameLogic.py (+19, -0) (Diff)