Search Unity

Managing a large number of components

Discussion in 'Entity Component System' started by Greenwar, May 17, 2019.

  1. Greenwar

    Greenwar

    Joined:
    Oct 11, 2014
    Posts:
    54
    I'm trying to wrap my head around on how to structure and manage a pure ECS project. More speciically I've been trying to figure out the best way to manage a large number of available components.

    It seems to me that any medium to large-sized project would eventually end up with thousands of components and archetypes, if not tens of thousands. Sifting through all that repeating code would quickly become unmanagable and time cosuming.

    How is this traditionally solved?

    Would it be reasonable to create some sort of editor which lists all of the components and archetypes and their values?
    For sanity sake, I'd also create a feature to code-generate new components.

    Maybe I'm overlooking something already inherent to ECS and which makes this obsolete, maybe I'm on the right track.

    Thoughts?
     
  2. siggigg

    siggigg

    Joined:
    Apr 11, 2018
    Posts:
    247
    The ECS editor will have the ability to create components as assets, where you get a nice editor experience of adding fields etc. Checkout the workshop or GDC talks on "Project Tiny" for a preview of what that will look like.
     
  3. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    You rather group components per functionality.
    You don't want keep all components in one file.

    You can have skills components file, related to skill systems.

    Or have building characteristics and features components, related to building systems.

    Then another group of components in separate file, for flight control, related to own system.

    Etc. This way, you know what is where and is manageable in smaller chunks of components.
     
    leni8ec likes this.