LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-12-2006, 12:07 AM   #1
Josh1billion
Member
 
Registered: Sep 2005
Location: WI
Distribution: Fedora Core 9
Posts: 36

Rep: Reputation: 15
SDL game programming tutorials (link)


Hey everyone.

I saw a C++ tutorial link thread so I thought I'd share a great link for those of you wishing to learn SDL.

http://lazyfooproductions.com/SDL_tutorials/index.php

Great tutorials. The tutorials are fairly short compared to most programming tutorials, which is good, and you still get all the information you want.

The tutorials further into the series get into game programming specifics, such as frame rate management and collision detection.
 
Old 03-12-2006, 03:53 PM   #2
scorbett
Member
 
Registered: May 2002
Location: Canada
Distribution: Slackware, Mandriva, RedHat
Posts: 46

Rep: Reputation: 15
Great link - definitely worth a bookmark. Although personally, when I was learning SDL, I found the best way was just to get in, start coding, and keep the API docs handy for when the inevitable problems arise. Tutorials are great when you're just starting out, but nothing beats hands-on experience.
 
Old 03-12-2006, 04:06 PM   #3
Operator23
LQ Newbie
 
Registered: Mar 2006
Location: Charleston, SC
Distribution: Vector 5.1STD
Posts: 6

Rep: Reputation: 0
What I want to know is what happened with SDLJava. Highly successful project, essentially completed, had qutie a bit of fanfare - but if anyone's done anything with it, they're sure keeping quiet about it.
 
Old 03-12-2006, 05:50 PM   #4
scorbett
Member
 
Registered: May 2002
Location: Canada
Distribution: Slackware, Mandriva, RedHat
Posts: 46

Rep: Reputation: 15
Quote:
Originally Posted by Operator23
What I want to know is what happened with SDLJava. Highly successful project, essentially completed, had qutie a bit of fanfare - but if anyone's done anything with it, they're sure keeping quiet about it.
I tried SDLJava for a project I was working on but wasn't terribly impressed. The performance was absolutely dismal compared to the equivalent code in C++ - especially for pixel-level operations. Of course, it's possible that I was doing something wrong, as it was my very first experience with SDL, but I switched to C++ and never looked back.
 
Old 03-12-2006, 06:34 PM   #5
Operator23
LQ Newbie
 
Registered: Mar 2006
Location: Charleston, SC
Distribution: Vector 5.1STD
Posts: 6

Rep: Reputation: 0
scorbett, that'd be great if I weren't still in an education system that loves Java.

Then again, I'll soon be in college and will likely switch nice & quick.
 
Old 03-13-2006, 07:32 PM   #6
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,337

Rep: Reputation: 65
Lazy Foo is actually a member in this forum. Even though we had a little "fight" in a few threads, I've to say that his tutorials are great. I wonder if it's possible to link Borland Free Compiler to SDL as well, since most of my coding is being done in Windows lately... hmmmm
 
Old 03-14-2006, 11:31 AM   #7
hatha
LQ Newbie
 
Registered: Apr 2005
Location: CA, USA
Distribution: Arch Noodle, Ubuntu Breezy, SuSE 9, Mandrake 2006
Posts: 10

Rep: Reputation: 0
Borland SDL

SDL works fine with Borland's free compiler. I used to use it all the time before switching to Linux.
 
Old 03-14-2006, 12:09 PM   #8
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,337

Rep: Reputation: 65
Quote:
Originally Posted by hatha
SDL works fine with Borland's free compiler. I used to use it all the time before switching to Linux.
Thanks for the reply hatha. Do you have a link/tutorial about getting SDL to work with Borland Free Compiler? It should be easier to use DevC++, but I don't like it much. I'd ratter use it with Borland and JEdit/TextPad, at least for a while. Been trying to google(is google a verb now? ghehe) a lot after this answer, but I either face one of those 404 pages or hit a really difficult tutorial to understand :\
 
Old 03-14-2006, 01:02 PM   #9
hatha
LQ Newbie
 
Registered: Apr 2005
Location: CA, USA
Distribution: Arch Noodle, Ubuntu Breezy, SuSE 9, Mandrake 2006
Posts: 10

Rep: Reputation: 0
Sorry, I don't. It took me a lot of trial and error to figure out how to use Borland's free compiler. If there had been a handy tutorial out there, it would have been nice Maybe I should write one (if only I weren't so busy).

Anyway, I don't think linking to SDL is that hard. IIRC (and this was a long time ago, mind you), there is and SDL.lib file and an SDLmain.lib file. You just need to link against both of these, and then make sure SDL.dll is either in the system DLL directory or in the current directory where the program is being run.

Hopefully that helps
 
Old 03-14-2006, 05:22 PM   #10
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
Quote:
Originally Posted by Mega Man X
Thanks for the reply hatha. Do you have a link/tutorial about getting SDL to work with Borland Free Compiler? It should be easier to use DevC++, but I don't like it much. I'd ratter use it with Borland and JEdit/TextPad, at least for a while. Been trying to google(is google a verb now? ghehe) a lot after this answer, but I either face one of those 404 pages or hit a really difficult tutorial to understand :\
there are some hits if you search 'borland' from the sdl site..

btw.. why do you prefer borland free over dev-c++?
 
Old 03-14-2006, 06:19 PM   #11
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,337

Rep: Reputation: 65
Hi there xhi! Thanks for the reply. I will take a look into sdl site for borland. It's not much as if I prefer Borland over Dev, but I don't like the DevC++ IDE that much. I'd ratter use something like jEdit or TextPad to start with and Visual Studio if I really want to get serious on SDL, I guess .

I've tried Dev a couple of times and found it unstable. Not sure if the new releases are better though. And apparently it's not only me having problem: There's a game that I've been testing (Eternal Lands, a free massige RPG) and it was made using Dev-C++/SDL. I lost the count of how many times that game crashed on me and returned some weird Dev-C++ messages :\.
 
Old 03-14-2006, 06:28 PM   #12
Lazy Foo'
Member
 
Registered: Dec 2005
Location: LA
Distribution: SuSE 9.3 Pro
Posts: 32

Rep: Reputation: 15
Quote:
Originally Posted by Mega Man X
I wonder if it's possible to link Borland Free Compiler to SDL as well, since most of my coding is being done in Windows lately... hmmmm
http://www.libsdl.org/faq.php?action...&category=4#46

and I have to say Dev C++ is really buggy.

Somebody emailed me requesting a tutorial for MinGW Developer Studio and I'm glad he did. I'm considering switching to it.

It has a VC++ 6.0 style simple interface with the GNU compiler's proven reliability.

Try that out.
 
Old 03-14-2006, 06:58 PM   #13
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
hmm.. i have not had many problems with Dev, but i guess that might be because i dont do a whole lot of c++ in windows.. and maybe because i have been using it for 5 or so years and am probably just used to any problems there are..

Lazy Foo', next time i am in windows i will have to check out your suggestion.. it looks interesting..
 
Old 03-15-2006, 12:37 AM   #14
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,337

Rep: Reputation: 65
Thank you Lazy Foo'. I'm giving it a shot tonight. Sounds interesting to use Borland with SDL
 
Old 03-15-2006, 12:04 PM   #15
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 919Reputation: 919Reputation: 919Reputation: 919Reputation: 919Reputation: 919Reputation: 919Reputation: 919
this thread inspired me to look into sdl for my next hobby project. here are a few of my concerns:

most tutorials seems to assume vc++ as a platform.
can somebody help me thru a proof of concept that will 'printf' hello world to an sdlsurface in 'c' ?

my dri is broken: http://www.linuxquestions.org/questi...hreadid=355693
so i won't be able to get into opengl later. unfortunately i have an ati card with bad linux support, does anyone have experience curing this problem?

thank you,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Tutorials cipicip Programming 4 01-04-2006 06:06 AM
[SDL] Platform game Cornholio Programming 5 03-17-2005 04:39 PM
SDL/game permissions noxious Fedora 0 11-15-2004 02:58 PM
Tank Game Collision Detection and Bullets SDL/C++ r3dhatter Programming 2 05-30-2004 01:42 PM
looking for programming tutorials / books, etc markus1982 Programming 18 03-12-2003 05:33 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration