[Bf-committers] BGE API - was 2.49 release proposal

Dalai Felinto dfelinto at gmail.com
Thu Feb 19 05:27:14 CET 2009


>1) return Objects, Meshes, not their names.
I really like this idea. In fact some methods (RayCast, RayCastTo)
already return the object instead of its name.
Since we can have objects with the same name (e.g. added through an
AddObject actuator) you can't always find the object through its name.
On the other hand you can always find a name through the object
(obj.name).

> 2) GET RID OF STUPID "OB" PREFIX EVERYWHERE!
I learned to ignore them, but I agree that they create a lot of "bugs"
and confusion. For example, the AddObject actuator Removing the OB
from the name of the objects don't crash nothing here. In fact
obj.name is a write and read property, if you wanna test it run this
script once:

[...]
scene = GameLogic.getCurrentScene()
objList = scene.getObjectList()

for i in objList:
	i.name = i.name[2:]
	print i.name
[...]

It may crash some physic interaction though.

> 3) return Mathutils types Vector(), Matrix() etc.
+1

<and now going a little back to the 2.49 release topic>

4) Will Sumo be abandoned in 2.5? If so we could print some warning alerts too.

5) BGE crashes when exit. (free pointers maybe) How to solve it to
make a real stable release?

BGE still crashes very often in windows. Not while running, but when
it stop after running for awhile. This is something I really would
like to see addressed but don't know how could be done in Windows
environment. I confess I didn't try to run my critical files with a
recent debug build though. Anyways, does anyone have a clue on that?

Cheers,
Dalai

http://blenderecia.orgfree.com

2009/2/18 Campbell Barton <ideasman42 at gmail.com>:
> Hey there, not sure if these changes would be appropriate for 2.49 or
> 2.5  BGE api but will suggest them anyway and see what ya think.
>
> 1) return Objects, Meshes, not their names.
>
> BGE api by default will return an Object/Mesh name when running
> actuator.getObject() and similar. Its much more useful to return the
> object or mesh its self, since I found in many cases I needed to
> lookup the scenes for the object name since I wanted to check the
> objects location or a property on it.
> I added an optional argument for some of the actuators to get the data
> rather then the name, but with attributes there are no arguments so
> for existing scripts...
>  act.getObject() -> act.object.name
> ...If we decide to return Objects/Meshes rather then just names.
>
> 2) GET RID OF STUPID "OB" PREFIX EVERYWHERE!
> there is a reason id.name+2 is used throughout blenders code. Not sure
> why nobody picked this up in the BGE before a release.
> For those of your who are not aware "Suzanne" is known as "OBSuzanne"
> in the BGE, Having to do  'ob.name[2:]'  is annoying.
>
> 3) return Mathutils types Vector(), Matrix() etc.
> Its annoying that in C++ you can do vec1+vec2 but in the python API
> you have do this one axis at a time or convert to Mathutils types.
> We switched some parts of Blender.* api to use Mathutils types and
> surprisingly few scripts broke because in most cases they can be used
> interchangeably with tuples/lists.
>
> -------
> 1) and 2) I'm quite keen on having,  3) is just a nice touch.
> For the changes I mentioned scripts will need updating and this will
> break more then the proposed get/set -> attributes change.
> Otherwise all these changes are quite easy to do, I can probably find
> the time in the next few weeks.
> I'll also update scripts in YoFrankie's SVN repo.
>
> - Campbell
>
> On Tue, Feb 17, 2009 at 4:37 AM, Benoit Bolsee <benoit.bolsee at online.be> wrote:
>> I'm strongly in favor of a 2.49 release. There has been significant
>> improvements on the BGE side that deserve an official release:
>> VideoTexture, BGE API cleanup, bug fixes.
>>
>> For the BGE API cleanup, we plan to have a transition phase where the
>> old API will still be supported but will produce deprecation warnings on
>> the console. A 2.49 release will allow us to propose a smooth transition
>> from 2.4x to 2.50 by introducing the new API in 2.49 and dropping the
>> old in 2.50.
>> Then the procedure to upgrade the scripts will be as follow: run your
>> game under 2.49 with warnings enabled, fix the scripts until there is no
>> warning, the game is ready for 2.50!
>>
>> Without a 2.49 we will have to do the transition between 2.50 and 2.51,
>> which looks a bit odd, or worse between a unofficial release and 2.50.
>>
>> Of course if we decide to go for a 2.49 release, I'll make sure that the
>> new API and VideoTexture and fully ready for the release.
>>
>> /benoit
>>
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list