I'm trying to make a platform game in 2D and I want to know what tool should I use to make it happen. I understand that I can use SDL with openGL. However, if I want to make a solid 2D platform game, should I use SDL? Or, openGL?
|
closed as off topic by Josh Petrie, Kylotan, Maik Semder, Byte56, Sean Middleditch Jan 3 at 18:53
Questions on Game Development Stack Exchange are expected to relate to game development within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.
|
If you want a lot of fancy effects and sprites on the screen at once, use OpenGL because it supports shaders and is hardware accelerated. If your game is simple and doesn't need a lot of effects or sprites, stick with SDL, especially if it's your first game. SDL isn't hardware accelerated, but it's much easier to use. Note that if you are going to use OpenGL, you can actually use SDL for everything but graphics at the same time. Other cross-platform windowing libraries that support OpenGL include:
|
|||
|
|
OpenGL is for rendering polygons on the screen and SDL provides low level access to hardware like joysticks and mice. SDL also provides access to the video frame buffer. I would suggest you use SDL for hardware stuff and OpenGL for drawing and stay away from the video frame buffer. It's easy enough to create an orthographic projection and position the camera so it's always pointing down at your scene. If you don't want to use polygons you can always use a textured quad as a sprite. This gives you all the power of OpenGL(rotate, while maintaining your 2d platform game feel. You might also take a look at love2d.org |
|||
|
|