I've been reading up on these, and there seem to be two major variations which I'd like to understand better.
Entities should contain only data Components, which are processed by systems which contain the logic
Entities can contain data and behaviour components
What are the benefits of one over the other? Which scenario would be appropriate for which approach?
What about the other variations, such as message handeling entities/components?
For example, say I want to attach a certain AI behaviour to an entity, approach #2 would let me do that intuitively by simply adding it to the behaviours of the entity. With approach #1, I'm not sure how it would be done, possibly by attaching a data member specifying which AI to use?
Wouldn't the AI processing system turn into one big switch(AI) { case AI_XYZ : AI_XYZ(); ...}
, as opposed to simply calling entity.AI(), or sending a message to the entity that tells it to update the AI...?
As with many things, there doesn't seem to be one "right" way to do this, trying them all doesn't seem feasible, I think most of the dis-/advantages wouldn't become apparent without implementing a sizable number of components and/or systems.
Personally, the message handling kind of components look appealing in a game context, simply being able to grab an entity and telling it to react to something, but I have no experience using such a system. I hope this question isn't too vague