SDL Tutorials

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Postby sirtom93 on Mon Apr 07, 2008 11:54 am

So how would you load images in such a way and blit images and stuff like that before it came out.

I got the pants thing to work. Pretty cool, gunna get a book and read it all like I did with c++ for dummys; anyone know any good books?
User avatar
sirtom93
Chaos Rift Newbie
Chaos Rift Newbie
 
Posts: 49
Joined: Sun Dec 09, 2007 11:34 am
Location: England.

Postby Arce on Mon Apr 07, 2008 5:55 pm

Focus On SDL

^ great book. That tutorial shown above was heavily influenced by and a result of it.
<qpHalcy0n> decided to paint the office, now i'm high and my hands hurt
Arce
Chaos Rift God
Chaos Rift God
 
Posts: 2182
Joined: Mon Jul 10, 2006 10:29 pm

Postby sirtom93 on Tue Apr 08, 2008 3:31 pm

Arce wrote:Focus On SDL

^ great book. That tutorial shown above was heavily influenced by and a result of it.


Awesome, ill look out for it.
User avatar
sirtom93
Chaos Rift Newbie
Chaos Rift Newbie
 
Posts: 49
Joined: Sun Dec 09, 2007 11:34 am
Location: England.

Re: SDL Tutorials

Postby MarauderIIC on Fri Sep 26, 2008 2:11 pm

Hey Arce, I changed the post name since that old acct of yours had been deleted, out of curiosity: can you edit it?
Of course if youre a moderator then you can probably edit anything...
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
 
Posts: 3430
Joined: Sat Jul 10, 2004 4:05 pm
Location: Maryland, USA

Re: SDL Tutorials

Postby cloudncali on Thu Jan 22, 2009 2:49 am

wow a post dedicated to SDL tutorials with out this:
http://lazyfoo.net/SDL_tutorials/index.php

this IMO is THE best SDL tutorial, he makes it so easy to understand, and yet you can do so much with it. hell i still use his timer class for simple projects.
User avatar
cloudncali
Chaos Rift Newbie
Chaos Rift Newbie
 
Posts: 13
Joined: Sun Jan 18, 2009 10:36 pm

Re: SDL Tutorials

Postby Ginto8 on Thu Jan 22, 2009 7:41 am

cloudncali wrote:wow a post dedicated to SDL tutorials with out this:
http://lazyfoo.net/SDL_tutorials/index.php

this IMO is THE best SDL tutorial, he makes it so easy to understand, and yet you can do so much with it. hell i still use his timer class for simple projects.

I agree. I learned SDL from Lazyfoo, and he is insanely good at making easy-to-understand tutorials (compared to other programming tutorials).
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
 
Posts: 1101
Joined: Tue Jan 06, 2009 6:12 pm

Re: SDL Tutorials

Postby jumboorange on Thu Jan 22, 2009 10:57 pm

I looked for Focus on SDL at a few stores and couldn't find it so I googled it to see if I could find it somewhere, and guess what i found:
http://books.google.ca/books?id=Lp_py9cSyuUC&pg=PT1&lr=&ei=6S15SZPVJ4-SMueDiMIE#PPP11,M1
The entire book, for free, thanks to Google.
[edit] I just looked at it again and its not the whole book... Back to my search i guess [/edit]
Anyone know if this book is any good? http://www.amazon.ca/exec/obidos/ASIN/1592000746/gam-20
jumboorange
Chaos Rift Newbie
Chaos Rift Newbie
 
Posts: 3
Joined: Tue Jan 20, 2009 11:58 pm

Re: SDL Tutorials

Postby programmerinprogress on Fri Jan 23, 2009 12:04 pm

I also learnt from Lazyfoo, but I believe once you've got your head around the pointers, the SDL DocWiki is probably the most invaluable source you'll find.
---------------------------------------------------------------------------------------
I think I can program pretty well, it's my compiler that needs convincing!
---------------------------------------------------------------------------------------
And now a joke to lighten to mood :D

I wander what programming language anakin skywalker used to program C3-PO's AI back on tatooine? my guess is Jawa :P
(That would probably explain why C3-PO is so camp as well :P)
User avatar
programmerinprogress
Chaos Rift Devotee
Chaos Rift Devotee
 
Posts: 657
Joined: Wed Oct 29, 2008 8:31 am
Location: The UK

Re: SDL Tutorials

Postby Daxtorax on Tue Mar 17, 2009 10:55 pm

I've tried to follow lazyfoo's tutorials, but I come up with one of two errors depending on how I change the include heading.
When the include is, #include "SDL.h" I get the following error:
fatal error C1083: Cannot open include file: 'SDL.h': No such file or directory
I get this error even after I add the SDL.dll to my project folder. I then saw on there that you can instead change the include to #include "SDL.h", I try this, but then I get the error:
fatal error C1189: #error : You should copy include/SDL_config.h.default to include/SDL_config.h
I looked in the include folder in SDL and found the SDL_config.h but don't understand how to add the default to the SDL_config.h?
I'm sorry if I'm asking a newbish question, I just don't know how to solve it, I've tried searching google, any help is greatly appreciated.
Daxtorax
ES Beta Backer
ES Beta Backer
 
Posts: 26
Joined: Sun Mar 15, 2009 2:34 pm

Re: SDL Tutorials

Postby Ewan on Thu Mar 26, 2009 8:36 pm

jumboorange wrote:I looked for Focus on SDL at a few stores and couldn't find it so I googled it to see if I could find it somewhere, and guess what i found:
http://books.google.ca/books?id=Lp_py9cSyuUC&pg=PT1&lr=&ei=6S15SZPVJ4-SMueDiMIE#PPP11,M1
The entire book, for free, thanks to Google.
[edit] I just looked at it again and its not the whole book... Back to my search i guess [/edit]
Anyone know if this book is any good? http://www.amazon.ca/exec/obidos/ASIN/1592000746/gam-20


Focus on SDL is on Amazon: http://www.amazon.com/Focus-Premier-Press-Game-Development/dp/1592000304 ;)

I think I'll buy it...I'm trying to build up a collection of C++ and Game Development books. Should help in the long run, even if I can't understand half the stuff in them at the moment :mrgreen:

BTW, thanks for the tutorial Arce.

It doesn't work for VC++ 2008 though :(
They pull out the truncheon, that's when the trouble starts.

'Cause when you've got a badge, the laws don't apply.
Ewan
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
 
Posts: 63
Joined: Mon Mar 23, 2009 12:46 pm

Re: SDL Tutorials

Postby herby490 on Fri Mar 27, 2009 7:58 pm

Ewan wrote:[
It doesn't work for VC++ 2008 though :(

Yes it does. Here is a tutorial on how to set it up in VC++ 2008 . There is also one in Focus on SDL.

EDIT: Forgot the link so here it is http://lazyfoo.net/SDL_tutorials/lesson01/windows/msvsnet0508e/index.php
Last edited by herby490 on Tue Mar 31, 2009 8:58 pm, edited 1 time in total.
herby490
Chaos Rift Regular
Chaos Rift Regular
 
Posts: 122
Joined: Thu Feb 12, 2009 7:59 pm

Re: SDL Tutorials

Postby MarauderIIC on Fri Mar 27, 2009 9:06 pm

You forgot the link?
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
 
Posts: 3430
Joined: Sat Jul 10, 2004 4:05 pm
Location: Maryland, USA

Re: SDL Tutorials

Postby xmjhsx on Fri Mar 27, 2009 11:13 pm

What all do I need to know before I start trying to learn SDL?
xmjhsx
Chaos Rift Newbie
Chaos Rift Newbie
 
Posts: 16
Joined: Tue Mar 24, 2009 4:54 pm

Re: SDL Tutorials

Postby Ewan on Sat Mar 28, 2009 6:13 am

herby490 wrote:
Ewan wrote:[
It doesn't work for VC++ 2008 though :(

Yes it does. Here is a tutorial on how to set it up in VC++ 2008 . There is also one in Focus on SDL.


I meant this tutorial ;)

Some of the stuff is in different places in the 2008 version, I couldn't figure out how to set it up. But I'm using Dev-C++ now so it's good :)
They pull out the truncheon, that's when the trouble starts.

'Cause when you've got a badge, the laws don't apply.
Ewan
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
 
Posts: 63
Joined: Mon Mar 23, 2009 12:46 pm

Re: SDL Tutorials

Postby programmerinprogress on Sat Mar 28, 2009 8:27 am

xmjhsx wrote:What all do I need to know before I start trying to learn SDL?


You should have at least a basic understanding of how to program, and you should be proficient with your language (most likely C or C++ if we're talking SDL)

The bare minimum you need to know (in my opinion) are:
- variables and constants (if you don't know how to use these, you can't program)
- control flow statements (conditional statements such as if...else, and iteration statements such as the for statement or Do...While)
- Pointers (the first thing you need to set up an SDL window, involves using pointers, understanding these are essential)
if you intend to write solutions in C++
- then a basic knowledge of OOP is essential, you don't have to be an OO zealot, but if you're going to be make games using objects, then a knowledge of how classes work, how they are wirtten, and their benefits is a definate must.
- It might also help to become acquanted with inheritance aswell.

Overall, you need to make sure you have a grip on the fundamentals of programming, at the end of the day, you have to ask yourself "can I program proficiently WITHOUT SDL", if yes, then proceed to instaling SDL :)
---------------------------------------------------------------------------------------
I think I can program pretty well, it's my compiler that needs convincing!
---------------------------------------------------------------------------------------
And now a joke to lighten to mood :D

I wander what programming language anakin skywalker used to program C3-PO's AI back on tatooine? my guess is Jawa :P
(That would probably explain why C3-PO is so camp as well :P)
User avatar
programmerinprogress
Chaos Rift Devotee
Chaos Rift Devotee
 
Posts: 657
Joined: Wed Oct 29, 2008 8:31 am
Location: The UK

PreviousNext

Return to Programming Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron