Switch to an Entity Component System
My, this is gonna be a huge refactor. But it's necessary. The compile times (when a header changes) and dependencies are a nightmare already, and we're just getting started. Inheritance and OOP in general just gets in the way of writing performant, clean code. What we have now is slowly turning into an unmaintainable mess that's gonna be slow to expand, slow to change, and even slower to execute. It's time for something else. Enter
Entity Component Systems
... which are built on the idea that game entities are made up of reusable "components," basically structs like Render(Component), Transform, Physics,..., lists of which can be handled as streams of homogeneous data, improving cache locality. An ECS approach avoids the use of virtual functions, the components are basically plain old data (C style), which speeds up the execution of individual functions (or methods in the OOP approach).
TL;DR: Everything is faster and related things are stored together as they should be.
-
Figure out how to store components and how to handle dependencies between them -
Implement a Component class -
Flatten the existing class hierarchy, creating necessary components along the way