Skip to main content
added 848 characters in body
Source Link

I like these approaches:

Shortly: Avoid mixing inheritance withkeeping update behavior within components. Components are not behavior. Behavior is(including updates) can be implemented in some single-instancedinstance subsystems. In such way you can easy manageThat approach might also help to batch-process similar behaviors for multiple components (maybe using parallel_for or SIMD instructions on component creationdata).

The IUpdatable idea and Update(gametime dt) method seems a bit too restrictive and introduces additional depencencies. It might be fine if you are not using subsystems approach, templatingbut if you do use them, then IUpdatable is a redundant level of hierarchy. After all, the MovingSystem should know that it must update the Location and also storing game entity structure/or Velocity components directly for all entities which have these components, so there is no need for some intermediate IUpdatable component.

But you could use Updatable component as a mechanism to skip updating some entities despite of them having Location and current state in/or Velocity components. The Updatable component could have a relational databasebool flag which can be set to false and that would signal every Updatable-aware subsystem that this particular entity currently should not be updated (although in such context, Freezable seems to be more appropriate name for the component).

I like these approaches:

Shortly: Avoid mixing inheritance with components. Components are not behavior. Behavior is implemented in some single-instanced subsystems. In such way you can easy manage component creation, templating and also storing game entity structure and current state in a relational database.

I like these approaches:

Shortly: Avoid keeping update behavior within components. Components are not behavior. Behavior (including updates) can be implemented in some single-instance subsystems. That approach might also help to batch-process similar behaviors for multiple components (maybe using parallel_for or SIMD instructions on component data).

The IUpdatable idea and Update(gametime dt) method seems a bit too restrictive and introduces additional depencencies. It might be fine if you are not using subsystems approach, but if you do use them, then IUpdatable is a redundant level of hierarchy. After all, the MovingSystem should know that it must update the Location and/or Velocity components directly for all entities which have these components, so there is no need for some intermediate IUpdatable component.

But you could use Updatable component as a mechanism to skip updating some entities despite of them having Location and/or Velocity components. The Updatable component could have a bool flag which can be set to false and that would signal every Updatable-aware subsystem that this particular entity currently should not be updated (although in such context, Freezable seems to be more appropriate name for the component).

Improved links
Source Link
doppelgreener
  • 7.3k
  • 7
  • 44
  • 69

I really like the apporach which is mentioned herethese approaches: http://www.gamedev.net/topic/463508-outboard-component-based-entity-system-architecture/page__st__40__p__4089913#entry4089913

and also here: http://t-machine.org/index.php/2009/10/26/entity-systems-are-the-future-of-mmos-part-5/

Shortly: Avoid mixing inheritance with components. Components are not behavior. Behavior is implemented in some single-instanced subsystems. In such way you can easy manage component creation, templating and also storing game entity structure and current state in a relational database.

I really like the apporach which is mentioned here: http://www.gamedev.net/topic/463508-outboard-component-based-entity-system-architecture/page__st__40__p__4089913#entry4089913

and also here: http://t-machine.org/index.php/2009/10/26/entity-systems-are-the-future-of-mmos-part-5/

Shortly: Avoid mixing inheritance with components. Components are not behavior. Behavior is implemented in some single-instanced subsystems. In such way you can easy manage component creation, templating and also storing game entity structure and current state in a relational database.

I like these approaches:

Shortly: Avoid mixing inheritance with components. Components are not behavior. Behavior is implemented in some single-instanced subsystems. In such way you can easy manage component creation, templating and also storing game entity structure and current state in a relational database.

Source Link

I really like the apporach which is mentioned here: http://www.gamedev.net/topic/463508-outboard-component-based-entity-system-architecture/page__st__40__p__4089913#entry4089913

and also here: http://t-machine.org/index.php/2009/10/26/entity-systems-are-the-future-of-mmos-part-5/

Shortly: Avoid mixing inheritance with components. Components are not behavior. Behavior is implemented in some single-instanced subsystems. In such way you can easy manage component creation, templating and also storing game entity structure and current state in a relational database.