Role of systems in entity systems architecture
        Posted  
        
            by 
                bio595
            
        on Game Development
        
        See other posts from Game Development
        
            or by bio595
        
        
        
        Published on 2012-07-01T17:17:55Z
        Indexed on 
            2012/07/01
            21:25 UTC
        
        
        Read the original article
        Hit count: 523
        
I've been reading a lot about entity components and systems and have thought that the idea of an entity just being an ID is quite interesting.
However I don't know how this completely works with the components aspect or the systems aspect. A component is just a data object managed by some relevant system. A collision system uses some BoundsComponent together with a spatial data structure to determine if collisions have happened.
All good so far, but what if multiple systems need access to the same component? Where should the data live? An input system could modify an entities BoundsComponent, but the physics system(s) need access to the same component as does some rendering system.
Also, how are entities constructed? One of the advantages I've read so much about is flexibility in entity construction. Are systems intrinsically tied to a component? If I want to introduce some new component, do I also have to introduce a new system or modify an existing one?
Another thing that I've read often is that the 'type' of an entity is inferred by what components it has. If my entity is just an id how can I know that my robot entity needs to be moved or rendered and thus modified by some system?
Sorry for the long post (or at least it seems so from my phone screen)!
© Game Development or respective owner