2 ms·
Not really. Composition has been the preferred technique for a long time already. A lot of Games and GUIs that use inheritance worked in spite of that inherita
by whstl 3y ago
Not really. Composition has been the preferred technique for a long time already.
A lot of Games and GUIs that use inheritance worked in spite of that inheritance. In more complex object graphs there were always things like override boolean DoNotActuallyRender() in one or two children of the RenderableNode class to account for special behaviour.
ECS is just the nail in the coffin of inheritance in game engines. And it's not even new anymore, it has been fashionable for what, almost 15 years now?