Skip to main content
GameDev.net gamedev.net
🔒 Locked 🤖 Godot

SDL Tutorials? Learning SDL

Started by Dawisch Nov 22, 2010 at 5:34 PM 7 replies 1.4k views
Original Post
Dawisch
Dawisch
Recently I've been looking into learning SDL. I know basic C++ and want to start learning to programing games with acctual graphics :D

I've looked through books but there is an extremly limited selection of books and the best one I could find was "Focus on SDL"... but... after looking it up on amazon and half.com and seeing it was $80 (rare aperantly?) I decided against it.

So my only option left, unless one of you knows of a good book I missed, is to use online tutorials. I found these: http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/index and thought they looked decent but I don't want to jump in with them till I've looked through all my options. Any reccomendations?

Thanks!

-David

AdrianC
AdrianC
I would actually recommend SFML instead of SDL. I found it MUCH easier to learn, just using the tutorials on its website. SFML applications will also run faster then SDL. (Unless you use SDL + OpenGL)

If you want to stick to SDL http://www.lazyfoo.net/SDL_tutorials/ has some good tutorials.
Dunge
Dunge
The first question would be, do you want to use SDL as a OpenGL wrapper (doing 3D graphics) or as the 2D part of it, blitting surfaces and stuff? If it's the second choice, you might want to take a look at SFML which is probably a bit better since it allow drawing of shapes without needing external addons like SDL_gfx pr SDL_draw.

Anyway, back to the question, the best guide is probably just reading the official stuff. There's just tons of tutorial on the official site.

The official guide:
http://www.libsdl.org/intro.en/toc.html
The official wiki:
http://wiki.libsdl.org/moin.cgi/FrontPage (1.2 at http://www.libsdl.org/cgi/docwiki.cgi)
The official page linking to external tutorial sites:
http://wiki.libsdl.org/moin.cgi/Tutorials
With an easy link to find being
http://www.sdltutorials.com/
Agent_Q
Agent_Q
The lib site itself has a few good recommendations!

http://www.libsdl.org/

I personally have found Lazy Foo and SDL Tutorials to both be excellent resources to get you started in this area.

http://www.lazyfoo.net/SDL_tutorials/
http://www.sdltutorials.com/

Another lesser known tutorial site (although I haven't reviewed everything he has done) was:

http://www.aaroncox.net/tutorials/2dtutorials/index.html

Hope this helps!
Gamer Gamester
Gamer Gamester
I also recommend SFML. The API has a really simple and elegant design in my opinion.
Dawisch
Dawisch
Wow! Lots of SFML suggestions XD

One more question I have would bet this. Would you reccomend using SDL with OpenGL?
I was thinking about learning SDL first simply for making 2D games and such and then moving on to OpenGL but I hadn't decided if I was going to use the two together yet.

If you guys think that SDL + OpenGL is a good option then I will probably learn SDL and make 2D games. Once I get a handle on that I'll start learning some OpenGL.

If it would be better to learn OpenGL completly seperate from SDL in the first place then I might check out this SFML. Thanks guys :D
AdrianC
AdrianC
I would start off with SFML and for 3d, I'd use something like Ogre3D or Irrlicht. These are graphic libraries that do a lot of the work for you.
Dawisch
Dawisch
Quote:
Original post by AdrianC
I would start off with SFML and for 3d, I'd use something like Ogre3D or Irrlicht. These are graphic libraries that do a lot of the work for you.


Ya I've seen some great games (even comercial ones) made with Ogre3D and have been interested in it for a while but wasn't sure if I had the abilities to use it.

That does sound like a good idea to start with something more simple like SFML and then use a graphic library for 3D. Thanks for the suggsetion! That may very well be what I end up doing :D

EDIT: One more question I forgot to ask. Does anyone know of some good tutorials/resources for learning SFML? All I could find was the tutorials on the official website. Anyone know of further resources that could be helpful?
Thanks again :)

[Edited by - Dawisch on November 22, 2010 10:15:01 PM]
AdrianC
AdrianC
SFML is still pretty new so there aren't many tutorials out there. Its pretty easy to pick up tho. Their community is fairly active and the creator will often answer questions himself.

I'm no expert (in fact, I've recently moved away from c++ and started messing with AS3/Flash instead) but I can also answer some basic questions.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.