Hi Guys,
I am reasonably early on in writing a framework for my game. (I hesitate to use the word 'engine' as I am making a game, not an 'all purpose' engine).
As it gets bigger, the code is getting a bit messy and hard to maintain. So I am wondering if the idea of 'sub classing' would make sense in my case.
At the moment I have separate graphic, input, and audio classes. The input and audio classes are maintainable, but he graphics one is getting big (as I anticipated would happen).
I am thinking of breaking the Graphics class down to sub classes. Something like this;
Graphics - General device creation etc.
Graphics::Objects - Subclass the objects to have creation and destruction handled by the graphics class.
Graphics::RenderTargets - I'll have multiple render targets as I need them for what I am doing.
Graphics::Shaders - Haven't thought too deeply with this one as to whether I need to subclass this or not.
Would this sort of approach be feasible?
I look forward to any thoughts and suggestions.