I want to make a sidescrolling 2D game with destructible terrain. My approach is having the terrain as a BMP and having access to each pixel.
However I have a problem with choosing the right graphics API for my game.
I have already considered several options:
- SDL
I started writing the game in SDL, I had the terrain as surface which I blitted onto the screen every frame. Unfortunately it was very slow, and it became even slower when more of the terrain was visible. I had 30 FPS when drawing only one bitmap on the screen.
- GDI
I have seen a game similar to the one I want to make. It uses GDI and can manipulate pixel by pixel. The speed seems O.K. but as SDL uses GDI as backend on Windows, why can I not just use SDL?
- SDL + OpenGL
Speed is very good, altough I have technical problems - I can't manipulate the texture anymore when it is loaded into OpenGL, and that breaks my whole plan
As mentioned before: I need to have access to every pixel of the image that is drawed, and drawing itself should be fast enough for a 1280 * 500 pixel terrain to be rendered smoothly.