Behavior Constructor
In ECS, an entity’s behavior is defined by the composition of its components.
Now, I want to extend this idea to allow the definition of component behavior as well.
Some use cases I’m targeting:
- Remove a parent component from an entity in response to specific conditions or the presence of child components.
- Add a new component to an entity, possibly higher up in the hierarchy, without requiring full knowledge of the entity’s structure or internal state.
- Update parent component values based on data from child components. This requires awareness of the values present in the parent component.
The goal is to eventually build a collection of base components and general-purpose systems that work together like a behavior constructor—a modular way to define and assemble behaviors without hardcoding logic into systems or entity definitions.