Hi guys,
So for the past few months I've been developing a little "pong meets arkanoid" game, learning directx and building a little framework as I go along. (I hesitate to call it an engine)
Though frustrating at times, I do find it immensely satisfying and educational to work with something I built, so I hope to keep exanding (and correcting) this code for future projects, which brings me to my question: I would like to make the code less dependent on API specific stuff (directx in particular) so that I could, for example, render the game in openGL should I wish to do so.
The trouble is that I'm not quite sure how to seperate the rendering code from the game objects.
I gather I would have a class called "render manager" or something like that, with a pointer to a "renderer" base class - similar to the 'strategy' design pattern. How does one isolate the actual drawing of the object from the game code? Right now my game objects all contain a pointer to a sprite object, which is rife with directX stuff.
I'm also now quite sure how to phrase this in a google query so I thought I would ask you guys.
Thanks for reading