Why are entity component systems the way they are? For example as far as I have seen it may look like this
class Entity
list of components
add component
remove component
update comentent
....
So you are building your entities at runtime. I assume it will look like this
Entity ork;
ork.add(AI).add(movement).add(physics).add(renderer)
The problem I see with this approach is that errors appear at run time instead of compile time. It also seems to add a lot of potential errors for example the AI system only makes sense if the entity also has a movement component.
What is the advantage of building your objects that way instead of doing it like this?
class Ork: IEntity
movementComp
AiComp
physicsComp
rendererComp
....
//wire everything together
One possible advantage that I can see is that object creation takes less code because you don't really need to wire up your objects, you just add your components and your done.
Would you please enlighten me?