From BlenderWiki

Jump to: navigation, search
Note: This is an archived version of the Blender Developer Wiki. The current and active wiki is available on wiki.blender.org.

Logic Bricks cleanup proposal

This proposal borns from http://wiki.blender.org/index.php/User:Moguri/BGE_Issues to have the logic bricks properly encapsulated and organized and to allow (at last) that the logic system won't be dependent on logic brick code.


Step 1. All Logic bricks should be put into their own folder (GameLogic)

1.1 Move the following sensors and actuators from Ketsji to Gamelogic folder:

- Armature Sensor
- Collision Sensor
- Near Sensor
- NetworkMessage Sensor
- Radar Sensor
- Ray Sensor
- MouseFocus Sensor
- Movement Sensor
- Camera Actuator
- Constraint Actuator
- EditObject Actuators (AddObject, EndObject, ReplaceMesh, Dynamic and TrackTo) (Done)
- Game Actuator
- Mouse Actuator
- NetworkMessage Actuator
- Object Actuator
- Parent Actuator
- Scene Actuator (Done)
- Sound Actuator (Done)
- State Actuator (Done)
- Steering Actuator (Done)
- Visibility Actuator (Done)

1.2 Move the following actuators from Converter to Gamelogic folder:

- Action Actuator
- Armature Actuator
1.3 Rename filenames from KX_ and KX_SCA_ to SCA_
1.4 Rename classes names from KX_ to SCA_
1.5 Make everything compile. At this point, several new dependencies should be added to GameLogic CMakeList.txt (i.e. Audaspace, Physics, Ketsji, blenkernel, etc)
1.6 At this point, we can also discuss if it is good to have all the SCA enums following the same criteria (i.e now we have KX_ACTUATORNAME, KX_ACT_ACTUATORNAME, KX_ACTUATORNAMEACT, ....). This will break existing scripts but it is easy to create a converter script from old enums to new enums. (On hold)
1.7 To update the documentation associated (rst)
Step 2. Logic bricks should expose functionality, not contain it.
2.1 Check every SCA to move the functionality that shouldn't be there to Ketsji.
2.2 Expose that new functionality in Ketsji through SCA.
2.3 Remove almost every dependencies included at step 1.
Step 3. Logic bricks should be implemented as a logic system that is separate from the engine itself
TBD