Let's say I have a
Transform-component-type, and a
Color-component-type (to keep things simple).
I also have an entity E that is assigned both of these component-types.
To render E, my engine will internally have to bind a uniform-buffer containing both a
mat4-transformation-matrix, and a
Now I think I heard conflicting opinions about whether there should be a strict 1-to-1 component_type-to-system relation, or whether it is considered more appropriate to have systems which act on multiple component-types.
In the latter case I'd know how to do things.
I would have a
RenderSystem, which only considers entities which have both a
Transform, and a
For the first case I don't have a solution though..
TransformSystem and the
ColorSystem wouldn't know how to render the entity, since they only hold a subset of what is required by the shader.
So I would just jump head-first into implementing my ECS as having one system potentially acting on multiple component-types, but I first wanted to hear from people having more experience with ECSs.
Are there good solutions in an ECS that maps systems 1-to-1 to components to achieve behavior that is the effect of the presence of multiple different component-types, or is a solution in which one system requires the presence of multiple component-types generally preferable?