SDL programming?

Started by
6 comments, last by LostSnow25 15 years, 8 months ago
I am wondering if SDL is worth learning for beginner game programming or should I just go into openGL or directX? Since I know nothing about c++ and nothing about making games, I thought it would be good to start with something very basic as SDL. I am also going to be getting Focus on SDL and Code Complete,2nd ED. to help gain a better understanding of C++.
Advertisement
Strictly speaking, I find it easier to learn about low level system like openGL and directX over SDL.

But since you are focusing on game, it might be easier to start from templates already running that you can play with to understand how to program, and I think you will find more of them in SDL.



SDL is fine for a beginner, and should you need it, SDL has OpenGL bindings (not sure that's correct term), so you can use OpenGL. As you advance, you can pick up DirectX or OpenGL.
Patrick
SDL is a decent library, however I would recommend that you try SFML, which is similar to SDL except written in C++ with an object-oriented design. It will help familiarize yourself with the object model and some of the programming concepts that you'll need later.
Both SDL and SFML make it very easy to set up a window to do direct drawing using their own APIs, or to use opengl in the window they create. I believe it is possible to make direct3d fit into the SDL window, and maybe SFML, although as far as I know neither is supported. Using opengl with either SDL or SFML would allow you to create a cross platform application fairly easily.
SDL is a great place to start. It's commonly used (meaning you can get lots of help) and a very simple and clean API. I'd also like to point out that most of what you will do with SDL (creating a window, handling input and window events, time management, loading images, surface manipulation, sound and music...) are all applicable to 3D games as well. In addition, you can easily interface SDL to OpenGL and even other libraries like Direct3D and Ogre. It's definitely a useful library.
Quote:Original post by BlodBath
SDL is a decent library, however I would recommend that you try SFML, which is similar to SDL except written in C++ with an object-oriented design. It will help familiarize yourself with the object model and some of the programming concepts that you'll need later.


As a thread lurker I'd like to thank you for pointing me to a very interesting library.
Thx for all the replys. I have been looking at Stompy's Gamedev Journal since all his games are 2d and what I read from way back in his journal are made in SDL. I also found a good website , http://lazyfoo.net/SDL_tutorials/index.php ,
which has tutorials for SDL and source code to download.

This topic is closed to new replies.

Advertisement