[Bf-committers] A patch to add an addObject() method to KX_Scene

Benoit Bolsee benoit.bolsee at online.be
Sun Feb 22 14:40:49 CET 2009

> +1 since its really useful.
> Though I wonder if this is a good direction to head - where 
> python replicates actuator functionality for convenience. - 
> Benoit? - what do you think?
I have no problem with Python function replicating actuator
functionality for convenience. In fact many game designers would like to
be able to develop a full game without logic bricks. I had a plan some
time ago to make that possible by providing a framework to augment the
KX_GameObject class with python methods and give access to actuator and
sensor functions through an API. 
That's a big project but giving convenience functions to access actuator
functions is a step in that direction. 

To come back on the BGE API change, we don't intend to break any of the
old functions, we are just adding new attributes to replace the get/set
method and create new methods when it is missing. Regarding the methods
that operate oddly, we will fix them by adding new methods or new
attributes, whichever makes more sense.
We plan to remove the old methods for 2.50 but actually I like the idea
of keeping them much longer and making them accessible through a
GameLogic.compatibility=248 attribute. Keeping the old method in the
code is just making the blender executable a bit bigger. They won't be
difficult to maintain, at least until we rework the BGE internals so
much that we have to redesign the API entirely anyway - but there is
nothing like that in preparation for the moment.


More information about the Bf-committers mailing list