Component-Based or Class(Inheritance)-Based

Inheritance is a useful tool, but it has always been somewhat abused in GameDev. Many old timers have horror stories of inheritance hierarchies that are 10+ classes deep… Imagine having to jump around 10 different files when debugging a single object instance. OO-heavy designs also usually explode into thousands of LOC in a single file because they’re so difficult to refactor. Visualizing code flows, understanding what state is stored in an object, etc quickly becomes exhausting. I would definitely avoid inheritance hierarchies that are deeper than 2 levels.

Component-based designs are usually more flexible and simpler to understand. Look up “composition vs inheritance” for tons of discussion on the topic. You will also find some related topics on this forum: When appropriate to use inheritance versus components

3 Likes