Sign in to follow this  
LostSnow25

SDL programming?

Recommended Posts

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++.

Share this post


Link to post
Share on other sites
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.



Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this