Over the past 2 nights, I have been researching and watching tutorials on SDL and OpenGL.  So far I believe I have the beginnings of a game engine.  It is starting to feel a bit like a very primitive version of the Cocos2d-iphone engine, which is my goal because that is what I am used to.

 

It is really basic, but so far I have it opening an SDL window, then instantiating OpenGL as the renderer.  I have an event handler class created to detect key presses or mouse clicks.  I am able to draw a basic OpenGL polygon using shaders and move it via keystrokes.  I was able to create a scene manager with different scenes so I can have a menu scene, game scene, etc. I also created a resource manager which can load files into memory.

 

Like I said it’s all super basic stuff, but I’m actually really fascinated by how it all fits together.  Previously I just used other engines that other people created.  Now I’m getting a better idea how it all works.

 

The internal debate I’m having is using the OpenGL renderer or SDL.  SDL is good for 2d graphics, but is lower performance due to not talking to the hardware directly.  OpenGL does do that, but it is more complicated and difficult to learn, but I can do more with it like lighting effects and particles.  It also has a good chance of not working with console ports in the future.  I’m hoping that I would be able to switch it out with a different renderer if I ever get a chance to port it to Nintendo, Playstation, or Xbox.

 

My next steps are to get it to load textures so I can display images so I can start to do meaningful things instead of just a blue square. Then I’d like to figure out how to do scene transitions – fade out / in, etc. I also need to verify that they remove from memory properly when switching.

 

All in all, this project is still exciting me and for not touching c++ in years, I feel like things are coming along great!