LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   SDL game programming tutorials (link) (https://www.linuxquestions.org/questions/programming-9/sdl-game-programming-tutorials-link-423982/)

Josh1billion 03-11-2006 11:07 PM

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.

scorbett 03-12-2006 02:53 PM

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.

Operator23 03-12-2006 03:06 PM

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.

scorbett 03-12-2006 04:50 PM

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.

Operator23 03-12-2006 05:34 PM

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.

Mega Man X 03-13-2006 06:32 PM

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

hatha 03-14-2006 10:31 AM

Borland SDL
 
SDL works fine with Borland's free compiler. I used to use it all the time before switching to Linux.

Mega Man X 03-14-2006 11:09 AM

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 :\

hatha 03-14-2006 12:02 PM

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 :)

xhi 03-14-2006 04:22 PM

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

Mega Man X 03-14-2006 05:19 PM

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 :\.

Lazy Foo' 03-14-2006 05:28 PM

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.

xhi 03-14-2006 05:58 PM

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

Mega Man X 03-14-2006 11:37 PM

Thank you Lazy Foo'. I'm giving it a shot tonight. Sounds interesting to use Borland with SDL ;)

schneidz 03-15-2006 11:04 AM

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,


All times are GMT -5. The time now is 12:01 AM.