Having made my first engine I am aware of the deficiencies of the way I have structured the code. While it may be easy for me to create a scene with multiple entities, performing optimisations like oct-trees, or being able to expand to make use of effects or animations seems a little tricky.
How should a good, solid and flexible (modular?) engine be structured? what would a scene class look like? entity classes? What would the scene rendering function look like?
I don’t want line by line code here, just a sort of blueprint for the skeleton.