Original Post
Simple question for you all, probably with some not-so-simple answers.
Of late there's been a massive increase in the number of people wanting to move towards component-based systems for their game characters, sometimes confusingly called "entity systems". In this, what used to be one big game object class is typically broken up into various component classes, and they are mixed and matched together and joined up in one of various ways.
Now, I understand the benefits of making small, cohesive bundles of code rather than 1 big uber-class. And I certainly appreciate that composition is generally preferable to inheritance when it comes to complex behaviour as you can more easily implement the permutations. All well and good.
But I'm intrigued as to why people think this applies so closely to game characters? I follow a lot of mainstream development too and nowhere else has there been such a rush to try and change one of their common domain objects to a new paradigm like many game developers are. What is specific to game development or game objects that makes them especially amenable to this approach? Why don't other developers need to go down this route to the same degree, and can we learn something from them instead? Is there a 'third way', that neither requires monolithic classes in a rigid hierarchy, nor a complex binding of algorithmic Lego? Why is it that, despite so many people being sure that components are the answer to the problem, we have nothing remotely resembling a consensus on how these components communicate (or if they even need to communicate at all)?
I'm interested to hear your views.
Of late there's been a massive increase in the number of people wanting to move towards component-based systems for their game characters, sometimes confusingly called "entity systems". In this, what used to be one big game object class is typically broken up into various component classes, and they are mixed and matched together and joined up in one of various ways.
Now, I understand the benefits of making small, cohesive bundles of code rather than 1 big uber-class. And I certainly appreciate that composition is generally preferable to inheritance when it comes to complex behaviour as you can more easily implement the permutations. All well and good.
But I'm intrigued as to why people think this applies so closely to game characters? I follow a lot of mainstream development too and nowhere else has there been such a rush to try and change one of their common domain objects to a new paradigm like many game developers are. What is specific to game development or game objects that makes them especially amenable to this approach? Why don't other developers need to go down this route to the same degree, and can we learn something from them instead? Is there a 'third way', that neither requires monolithic classes in a rigid hierarchy, nor a complex binding of algorithmic Lego? Why is it that, despite so many people being sure that components are the answer to the problem, we have nothing remotely resembling a consensus on how these components communicate (or if they even need to communicate at all)?
I'm interested to hear your views.