Re:Game Development Essentials #1 - Don’t use inheritance fo...
by acron0 on Tuesday February 07, 2012 @02:35AM
(#3560879)
This model is pretty mainstream these days and the best commercial implementation I've seen has to be in the Unity3D engine. It's almost entirely componentised, and writing totally generic 'work-anywhere' components is liberating.
One thing I dont think the article mentioned is that polymorphic approaches are also often a lot slower, and this is crucial when working on platform hardware, especially the more constrained stuff.
All that said, some of the comments are correct; inheritence does have a place, but it should be used sparingly.
One thing I dont think the article mentioned is that polymorphic approaches are also often a lot slower, and this is crucial when working on platform hardware, especially the more constrained stuff.
All that said, some of the comments are correct; inheritence does have a place, but it should be used sparingly.