Original Post
Hey guys! I've been working with games development (on a *very* small scale) for a couple of years now through college, using Java and the SLICK API at first, followed by C++ and OpenGL. However, so far all my games have been quite poorly designed - each object has contained it's own "render" function that it overrides, and the code for drawing the entity to the screen is hard-coded.
What kind of design patterns work well in games? Should I be separating animation and graphics from game logic, or should I keep putting them together in a single "GameEntity" class?
(As a side note, is there an easy way to export models made in Blender and import them into my game? Would I be able to set openGL properties like material properties from within Blender? This would mean I could maintain a reference to a model file in my Entity class and just pass that to a singleton Renderer object when i needed to render the entity.)
I'd like to step up from making one-shot games without much re-usable code to making a platform that I can keep using and improving as I go - at the moment, each game is created from the ground up.
I'm using C++, with OpenGL and SDL.
What kind of design patterns work well in games? Should I be separating animation and graphics from game logic, or should I keep putting them together in a single "GameEntity" class?
(As a side note, is there an easy way to export models made in Blender and import them into my game? Would I be able to set openGL properties like material properties from within Blender? This would mean I could maintain a reference to a model file in my Entity class and just pass that to a singleton Renderer object when i needed to render the entity.)
I'd like to step up from making one-shot games without much re-usable code to making a platform that I can keep using and improving as I go - at the moment, each game is created from the ground up.
I'm using C++, with OpenGL and SDL.