Learn SDL?

cdsboy
Unregistered
 
Post: #1
I just finished the book "Beginning C++ through game programming", which i really liked. So now i would like to apply what i learned in that book. My problem is that i would rather go with a graphical game then a terminal one. After reading alot of posts i've desided to go with SDL. I tried searching the internet for good tutorials or books to learn. The only thing I found was Lazy Foo's tutorials. I found these hard to understand and was hoping you guys knew of a better way to learn SDL. I am mainly looking for a free way to learn it, although if you know of a must have book that is under $50 i would seriously consider going that route. Also i am not set on going with SDL if anyone knows of a differnt engine that handles graphics, timers, events, and basic sounds, that you consider easier i will check it out. Anyways thanks in advanced.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #2
Well I have a basic template here which gives you a window with an OpenGL view in it, and it sets up timers and key event handling. It uses Cocoa to get the window and events and so on so you will have a much more Mac like program than using SDL.
Adding sounds/texture loading etc to it is quite simple as well (You'd probably want to check out OpenAL for audio later on).
Anyway hope thats helpful, if not just get the reqiured frameworks from http://libsdl.org/ (the developer ones) and theres Xcode templates with them as well.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
cdsboy
Unregistered
 
Post: #3
I am looking for something that explains why stuff works and/or how to do it myself.
Quote this message in a reply
Member
Posts: 338
Joined: 2004.07
Post: #4
cdsboy Wrote:I am mainly looking for a free way to learn it, although if you know of a must have book that is under $50 i would seriously consider going that route.

Focus on SDL:
http://www.amazon.com/Focus-Premier-Pres...208&sr=8-1

This is a very easy book to follow, covers all the auxilliary libraries (SDL_mixer for sound, SDL_image for texture loading, SDL_net for networking, etc) and is dirt cheap to boot.

Also seconding http://www.libsdl.org. Along with frameworks they have more up-to-date documentation (the book is a few years old, so I'm not sure if some info is now out-of-date.)

Justin Ficarrotta
http://www.justinfic.com
"It is better to be The Man than to work for The Man." - Alexander Seropian
Quote this message in a reply
cdsboy
Unregistered
 
Post: #5
Well i acually desided to go with OpenGL. So i went and bought myself the redbook. Hopefully that should get me started!
Quote this message in a reply
Member
Posts: 312
Joined: 2006.10
Post: #6
You do know edition 2 of that book is free?
Quote this message in a reply
Moderator
Posts: 702
Joined: 2002.04
Post: #7
@cdsboy: OpenGL is not a complete solution; you will still need another API (SDL, GLUT, Cocoa, etc) to create the OpenGL context, handle timers and events, etc.

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
Member
Posts: 57
Joined: 2005.08
Post: #8
if your still interested in SDL check these tutorials, havent gone through them but they look alright:

http://sol.gfxile.net/gp/ch01_osx.html
Quote this message in a reply
Dreamer
Unregistered
 
Post: #9
The best way to learn to program using SDL as the target is to go to the SDL site and read through the tutorials listed there, there is even an excellent SDL on Mac Tutorial.

Don't waste money on books BTW, in game development at least 1/2 of the stuff taught in books is either outdated, or buggy, or focuses entirely too much on theory, or teaches dangerous and sloppy programming habits.

Instead get yourself a subscription to the library at safari.oreilly.com, this way you have access to hundred of books on development in general, at your finger tips 24/7 and it costs less than going to the bookstore and purchasing a single book.

If however you still want to have a nice fat doorstop to cuddle up with let me recommend the following "must haves"

#1 OpenGL Redbook
#2 OpenGL SuperBible (known as the Black Book)
#3 OpenGL Shader Development (commonly known as the Yellow book)
#4 3D Game Engine (Design/Development/Architecture) it's a series of books and you can find them at http://www.geometrictools.com/Books/Books.html

Additionally, if you have no programming background pick up a good book on the programming language of your choice.
Quote this message in a reply
Post Reply