Pseudonym wrote:croxis wrote:My understanding of a "pure" ecs (from the t-machine article) is that components just hold data and have no functions of their own -- their internal states are read/written to by the appropriate systems. That being said two ecs systems I've seen (unity and spout) have convenience functions in the components. I understand the need for a more pragmatic design though.
Do you have a link to that article?
I don't see a problem with either approach in principle. Whether you tell a sound effect to play itself or get a sound effect which you play... it doesn't matter to me as long as we stick to one. However, I can certainly imagine that some components may have to make some decisions which require logic, like deciding whether or not the enemy and the player have line of sight.
Here is my article about ecs which describes how components should be data only http://www.gamedev.net/page/resources/_/technical/game-programming/mvc-and-cbes-as-it-relates-to-game-programming-r3114