PhysicsConstraints is documented in the Game Kit Book:
http://download.blender.org/documentation/gamekit1/
VideoTexture is documented in the wiki:
http://wiki.blender.org/index.php/Dev:Source/GameEngine/2.49/VideoTexture
I don't think I will have time to fill the documentation. But I hope this commit helps someone interested in helping it.
Therefore volunteers to document those modules are highly welcome !!! (let's give to BGE the documentation it deserves)!
* + added GameLogic.Lave/LoadGlobalDict + some typo fixes
* Removed modules Expression and CValue, neither were ever available.
* Added GameLogic.EvalExpression(exp) from the Expression module, evaluates an expression like the expression controller (not sure if this is really that useful since python is far more advanced).
* resetting the original blend file path didint work (own fault == -> =)
* Py3.x PyModule_Create didnt allow importing since it didn't add to sys.modules,
Looks like they want us to use init-tab array, but this doesn't suit us since
it needs to be setup before python is initialized.
* Documented GameLogic.globalDict
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
[#18701] Issues with camera.pointInsideFrustum method
- note in docs that the projection matrix is not correct for first logic tick.
Renamed...
KX_Camera.isViewport -> KX_Camera.useViewport
KX_Lamp.quat_attenuation -> KX_Lamp.quad_attenuation
Deprecated KX_Camera.getProjectionMatrix(), KX_Camera.setProjectionMatrix() for projection_matrix attr
Added most missing docs reported by the doc-checker script
Looked into ways around this but epydoc has no way to import a class without its module and the @include field is maked as 'TODO'.
Also removed the outdated 'WhatsNew' section and linked to the 2.49 release notes.
also deprecated getActuators() and getSensors() for 'sensors' and 'actuators' attributes.
an example of getting every sensor connected to an object.
all_sensors = [s for c in ob.controllers for s in c.sensors]
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().
- print CListValue errors only once.
- bge_api_validate_py.txt now validates modules as well as types.
- added missing functions and consts for epydoc modules. some of these in GameLogic.py still need sorting.
- added keyboard senser attribute "events" to replace getEventList()
- fix 2 memory leaks in the python api (was making a list but not returning it)
- setting readonly attributes didnt give a good error message.
* Made GameLogic.addActiveActuator(actu, bool) to raise an error if the actuator is not in the list. Before it would allow any value as the actuator and fail silently (makes debugging scripts more difficult).
* Allow the actuator to be a string which is convenient if you dont want to change the settings of the actuator.
* Added activate/deactivate functions to the controller, this is more logical since the GameLogic.addActiveActuator() function is running through the controller anyway.
GameLogic.addActiveActuator(controller.getActuator("SomeAct"), True)
...can be replaced with...
controller.activate("SomeAct")
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
Introduction of a new Delay sensor that can be used to
generate positive and negative triggers at precise time,
expressed in number of frames.
The delay parameter defines the length of the initial
OFF period. A positive trigger is generated at the end
of this period. The duration parameter defines the
length of the ON period following the OFF period.
A negative trigger is generated at the end of the ON period.
If duration is 0, the sensor stays ON and there is no
negative trigger.
The sensor runs the OFF-ON cycle once unless the repeat
option is set: the OFF-ON cycle repeats indefinately
(or the OFF cycle if duration is 0).
The new generic SCA_ISensor::reset() Python function
can be used at any time to restart the sensor: the
current cycle is interrupted and no trigger is generated.
Add a function GameLogic.expandPath() that works like Blender.sys.expandpath() and is also available in the BlenderPlayer.
Fix the game actuator in the BlenderPlayer to work like in Blender:
- try first to load the .blend from the current working directory
- if not found, try to load from the startup .blend or runtime base directory
Keyboard sensors can now hook escape key. Ctrl-Break can be used from within blender if you've forgotten an end game actuator.
Fixed a stupid bug preventing some actuators working (like TrackTo).
Better use of booleans for python
#include fixes for Windows
Python Doc fixes
Use the farthest vertex as the face position when z sorting faces. (Camera is on -z axis!)