[Bf-committers] Feedback on BGE Collision API

Mitchell Stokes mogurijin at gmail.com
Tue Mar 22 05:07:12 CET 2011

Method overhead could be rather problematic using callbacks with a lot
of collisions. And I agree that an even list/queue makes more sense
for the current API.

I'm not interested in adding other callbacks at the moment, but you're
right that the method for registering callbacks should use a specific
name to allow for other options later. Also, the "owner" of the
collision event probably should be included in the event (as you said)
so that you can always have a reference to the object.
Handler/Listener classes are another possibility, especially if
callbacks were implemented for more than just collisions.

The BGE currently doesn't have good support for subclassing, so people
wont be defining on_collision methods for objects. This is why a
callback would be needed instead.

Thanks for the tip. I'll take a look at them.

Thanks for the feedback! I think I'm now leaning much more towards a
per frame list/queue of some sort. Dalai or Campbell, do either of you
have any suggestions/feedback?


More information about the Bf-committers mailing list