Danger! Long Text!
Hi,
usually I do not post that much feature request as I’m quite happy with the Blender and the BGE.
But here is an idea that could move the development pipeline for the BGE much further. I want to use this thread to present the proposal and collect your thoughs, concerns and ideas.
Maybe this is possible as Add-On. It looks like I have to join the development path :spin:.
If you do not understand what I’m writing here, just ignore it ;).
Otherwise what do you think?
Monster
Proposal of Group/Instance Properties
Glossary:
•Group: An entity that can be assigned to objects
•Group Object: An object that is assigned to a group (green)
•Instanciating Object: Object that creates the Instance Object via Doupli Group
•Instance Object: A copy of a Group Object that is created via Doupli Group
Existing (Object) Properties:
•The existing properties are Object Properties
•They belong to the properties owner (object) only
•They can be used in Sensors, Controllers (incl. Python) and Actuators
•When instantiating a group the newly added Instance Objects and its properties are not accessible, but the Object Properties of the Instantiating Object are.
What are Group Properties?
•Group Properties belong to the objects of a group
•All objects show all Group Properties in the properties panel (marked as Group Properties)
•Group Properties appear as Reference to the same Data location (change at one object is a change on all others)
•Group Properties can be used like Object Properties.
Property GUI for Group Objects
What are Instance Properties?
•When instantiating a group - the newly added Instance Objects are not accessible, but the Object Properties of the instantiating object are.
•The Group Properties of this particular instance appear as Instance Properties of the Instantiating Object
•The Instance Properties are only shared between the Instantiating Object and the Instance Objects (not with the original Group Objects!)
•This allows the Instantiating Object to provide individual Parameters to the Instance Objects and get information back from the Instance Objects
•The Instance Object can use the Instance Properties like normal properties with one exception:
•Instance Properties can’t be added or deleted
Property Gui for Instance Objects (without the X):
Benefits
•The Instance Properties act as interface between the Instantiating Object (full access) and the Instance Objects (no access)
•It allows to create groups with complete logic setups (incl. but not restricted to Python) as Libraries.
•Individual parameters can be configured at the Instantiating Object
•For instantiating it is not necessary to know the internal implementation of a group (which is not accessible at that point anyway)
•Objects in a group/instance can share information to each other, without knowing each other.
•Objects of a group/instance can share information with the Instantiating Object.
Drawbacks
•Objects in multiple groups:
–Maybe adding the Group Properties to all Objects of both groups?
•Removing an object from a group:
–Treating as single object group ?
–Removing all Group Properties (if not used in SCA) ?
–Converting to Object Properties ?
•Duplicate property names possible when adding an object to a group:
–Removing the Object Property ?
–Auto renaming of the Object Property ?
API Extentions
KX_GameObject:
Access via dict - as with Object Properties (e.g. object[“prop”])
a)Added to getPropertyNames() [not distinguishable from Object Properties] or
b)New getGroupPropertyNames()