On 11/3/2011 at 5:02 PM, Madhed said:Does any one know why the inheritance obsession became so widespread that the new term "component based entity" had to be invented?
It comes from object oriented design, under which you focus on defining classes to represent your different types of application-domain objects. When thinking in terms of object oriented design, you typically think about how different types of objects relate to each other - what attributes they share, and how they differ. And the basic strategy for sharing features is to define object types in terms of other (more basic/general) object types.
This approach worked very well to promote encapsulation and separation of concerns, when the objects, and the relationships between them, were relatively simple. For example, suppose you made a banking system and defined class hierarchies for accounts, and transactions. Those are relatively simple, conceptual objects, with only a handful of possible operations each, and not much variation in the different types of each.
Once you get into our type of real-time simulation world, with a wide variety of objects having arbitrary collections of a lot of very different types of features, it breaks down pretty quickly.
But let's not forget that once you use a component system to build your wide variety of entity types, there's still room to then create small hierarchies of closely related entity types. For instance, you could define a class to represent the skeleton MOB, pulling together all its requisite components. And you could define a handful of different skeleton variations which represent minor alterations like differing initialization values. True, this might not make it into the run-time, and might be happening in a tool, but the point is, even when using component based entities, inheritance isn't obsolete. We just have to use it where it's the best tool.
On 11/3/2011 at 5:02 PM, Madhed said:I'm just wondering why there seem to be so many paradigm shifts in game development.
Because we've been making games a long time, and their complexity has been continuously changing. The problems with object oriented design are something we had to learn the hard way.