6
\$\begingroup\$

Alexandre Vaillancourt's answer to this recent meta question made me realize we have a bit of a mess of tags in the neighbourhood of entity component systems:

  • - 11 questions (created September 2018)
    "Used when referring to the Entity-Component-System (ECS) architecture."
  • - 376 questions (122 also tagged component-based)
    "A programming paradigm in which gameobjects (entities) are composed out of components, and are operated upon by systems. Each entity is an ID that points to specific components."
  • - 107 questions (no tag guidance)
  • - 269 questions (122 also tagged entity-system)
    "Component-based designs rely on separating the multiple logical attributes of business objects and game objects into small components dedicated only to specific tasks. Whereas game objects are usually modeled to reproduce the attributes and behavior of "real world" objects by aggregating them together and allowing specialized objects to inherit from general ones, component based design relies on composition rather than inheritance."
  • - 24 questions(no tag guidance)

Adding to the confusion, the present tag guidance on the entity-system tag seems to describe an entity component system:

Gameobject: anything acting in the game (car, gun, Steve).

Entity: a globally unique identifier (string, number) pointing to a set of components that comprise a gameobject.

Component: a blob of data or simply a tag (Position, Velocity, Renderable).

System: implements functionality. Systems operate on components (Renderer, MovementSystem).

See this answer for a through explanation of an Entity System.


We've had previous meta questions in this neighbourhood:

My question is:

Should we do anything to sort out this proliferation of related tags?

ie...

  • Should we add / modify the tag guidance to better-clarify the role of each tag?
  • Should some tags be merged?
  • Is the status quo good enough as-is?
\$\endgroup\$
7
\$\begingroup\$

I think we should merge these five tags down to just two:


Rationale:

While there may originally have been an important distinction between entity-system and entity-component-system, that distinction has not been reflected in the use of these tags or their descriptions for several years now.

"Entity-Component-System" is sufficiently well-entrenched now as a concept that it makes more sense to our users to refer to this as one tag than as the compound "component-based entity-system", leading them to create the tag even after multiple meta threads arguing it wasn't needed.

Questions about managing game entities without "systems" or "components" as explicit participants can be handled with the tag. (As recommended by Alexandre Vaillancourt here)

If we find a need to categorize questions about entities and systems that don't include components / fit an ECS model, I'd recommend that we create a new tag for those, with a name less likely to be confused with ECS.


Proposed Tag Guidance: (Draft - critique & edits welcome!)

  • ECS is a game architecture that treats each piece of game content (entity) as a logical collection of modular chunks of data (components) that describe the kind of thing it is and its attributes or current state. Behaviours in the game are performed by systems that act on entities with the relevant components to update that state.


    There are many valid ways to approach an ECS, some emphasizing design.

    // TODO: elaborate with some examples of common ECS approaches and links to relevant documents.

  • In a component-based approach, the attributes or behaviours of game content are built in small modular pieces called components. The identity of a piece of content is built up by attaching one or more components to it, rather than making a unique or derived data type for each kind of content. (See composition over inheritance)


    Component and MonoBehaviour types in the Unity game engine are a common example of a component-based approach.

    // TODO: Give example of problems with inheritance hierarchies for game content, eg. Shield vs Weapon types and a spiked shield that can be attacked with as a weapon.

    // TODO: sketch how composition might be used for just part of a game, like adding behaviours to inventory items, or to build core behaviour of all game entities.

    Sometimes a components will combine both data and methods to act on that data, like an Update() routine.

    Other uses may treat components as "Plain Old Data Structures" with any behaviour defined outside the component, as in an


Next Steps:

I don't think we can count on a straight merge to sort all of these out, since the tags have been used so haphazardly. So this will likely be a gradual process of sorting questions out of this cluster.

\$\endgroup\$
  • \$\begingroup\$ Do you have a proposal for the updated tag excerpts and descriptions? I otherwise would think that it's a good move for us. \$\endgroup\$ – Vaillancourt May 9 at 12:52
  • \$\begingroup\$ Good note: I'll try to draft some up today. \$\endgroup\$ – DMGregory May 9 at 12:55
  • \$\begingroup\$ I'll have to admit, though, that the gameobject tag puzzles me. Can a question be tagged as such on its own? What would it be about? Do we need a question about that? What's the meaning of life? \$\endgroup\$ – Vaillancourt May 9 at 13:54
  • \$\begingroup\$ @AlexandreVaillancourt Maybe we can further improve that. I think the intention of the gameobject tag, the original entity-system, and the short-lived entity, is to categorize questions about how we implement the base "thing" in a game and manage/update these collections of things in our world. Though in practice, gameobject seems to get used any time the question is about working in an engine that calls its base entity "GameObject" like Unity does. Maybe we should consider more explicit naming / tag guidance for that one too. \$\endgroup\$ – DMGregory May 9 at 16:24
  • \$\begingroup\$ Or just remove it! \$\endgroup\$ – Vaillancourt May 9 at 16:32
  • \$\begingroup\$ Good update, thanks for adding it! \$\endgroup\$ – Vaillancourt May 9 at 17:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .