Click to See Complete Forum and Search --> : SDL on Fedora Core 1


RallyMonkey
05-15-2004, 04:00 PM
If you install SDL through Synaptic is there any other configuration you have to complete to use it with C++? Also, Do you know of any beginner friendly SDL tutorials. The ones on the main site aren't very usefull.


Thanks!

JCool451
05-16-2004, 07:31 PM
SDL Resources/Tutorials/etc:

- The SDL documentation is a good resource after you know what you're doing.
SDL-docs (http://sdldoc.csn.ul.ie/) [sdldoc.csn.ul.ie]

-Cone3d has some awesome tutorials.
Cone3d (http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/index) [cone3d.gamedev.net]

-The super-elite overcode wrote a book that includes a complete section on SDL. It's legally available online for free, but you might want to buy it. He had it on his site, but it seems to be down right now, so here is a mirror.
Overcode's_book (http://glh.sourceforge.net/doc/plg-final-pdf-no-really-i-mean-it-this-time.pdf). (Just incase you're curious, overcode's site is here (http://overcode.net). [overcode.net])

-Gamedev.net did a few articles a couple years ago. They live in the win32 world, but it's not win32 specific. It is still helpful. Gamedev-SDL-Articles (http://gamedev.net/reference/list.asp?categoryid=45#188) [gamedev.net]

-The IBM developer's network showcased a few articles written up by Mr. Sam Lantinga himself! You'll have to do a search through their articles, the links within the articles are broken. Here are the search results. (http://www-106.ibm.com/search/searchResults.jsp?searchType=1&searchSite=dW&query=sdl&searchScope=dW&Search.x=0&Search.y=0&Search=Search) [ibm.com] All the articles on the top are relevent.

-This guy named Andrew wrote up a couple of articles. Andrew-tutorials (http://andrew.textux.com/Articles.html) [andrew.textux.com]

-Try looking at source code to various games. I know it's not a tutorial, but it does help a lot. I think that messing around with source code is more valuable than just reading a few papers, but that's just my opinion. Look for some games at happypenguin (http://happypenguin.org) [happypenguin.org], most of them use SDL. A lot of them are programmed in C, but you can probably deal with that. If you want to learn any tricks or advanced material, then looking through source code is pretty much the only way.

-(Non-free paper-back book)Primier Press' Focus on SDL. What can I say? It's a book completely on SDL, which is pretty rare to find. It's a prety gentle introduction to SDL.

I wish I could say there was more, but that's about all that is worth reading. :( I hope this helps you!!!

Edit: I forgot a very important resource. Around 5 game programming articles were published in Linux Magazine. They are available online for free in pdf format.

Direct links-
Article 1 (http://www.linux-magazine.com/issue/33/GameCreation_Part1.pdf) [linux-magazine.com]
Article 2 (http://www.linux-magazine.com/issue/34/Game_Creation_Part_2.pdf) [linux-magazine.com]
Article 3 (http://www.linux-magazine.com/issue/35/Game_Creation_Part_3.pdf) [linux-magazine.com]
Article 4 (http://www.linux-magazine.com/issue/36/Game_Creation_Part_4.pdf) [linux-magazine.com]
Article 5 (http://www.linux-magazine.com/issue/37/Game_Creation_Part_5.pdf) [linux-magazine.com]

There is also a very excellent series of tutorials at jnrdev (http://jnrdev.weed-crew.net/). [jnrdev.weed-crew.net]

Then Pixelate (http://www.pixelate.co.za/) [pixelate.co.za] e-zine releases some SDL articles every once in a while.

JCool451
05-16-2004, 07:58 PM
Originally posted by RallyMonkey
If you install SDL through Synaptic is there any other configuration you have to complete to use it with C++?


As far as i know, you only need the devel and runtime files to develop SDL programs for C++. Take a look below for a super-mini-howto.

1) Make sure you have the SDL runtime and SDL devel files. They can be found on libsdl.org.

2) Put #include "SDL.h" in your includes.

3) Compile and link your program with g++ file.cpp -o file`sdl-config --libs --cflags`

Note that those are backticks (`), not single quotes ('). The backtick character can be found on the same key as the tilde (~), which would most likely be left of the one (1) on the top left corner of your keyboard.

4) You're done, so give yourself a cookie. Just make sure that "Alex Cavnar, aka alc6379" (the cookie monster, himself) doesn't see it!

RallyMonkey
05-16-2004, 08:03 PM
Thank you!:D

JCool451
05-16-2004, 08:06 PM
No problem, man. If you ever need help, just post away.

dboyer
05-16-2004, 08:08 PM
I believe it should be:

#include <SDL/SDL.h>

at least, on my system.

http://asuaf.org/~dboyer/game/paddlegame-src/ if its any use. Really ****ty breakout style game i whipped out one night to learn SDL. I wouldn't recommend using the game code, its supercrappy. However, the SDL set-up code is pretty spiffy, a decent example. Got it from some tutorial.

JCool451
05-16-2004, 08:20 PM
Actually, you're right. You can do either. #include <SDL/SDL.h> and #include <SDL.h> both work. I've heard that the SDL.h method is more portable, which is why I gave that way. I don't really know if it actually is more portable, that's what I just heard.

Oh, and I forgot a VERY good tutorial, maybe the best. I put the details in my original post.

JCool451
05-16-2004, 10:42 PM
Originally posted by dboyer
I believe it should be:
http://asuaf.org/~dboyer/game/paddlegame-src/ if its any use. Really ****ty breakout style game i whipped out one night to learn SDL. I wouldn't recommend using the game code, its supercrappy. However, the SDL set-up code is pretty spiffy, a decent example. Got it from some tutorial.

Actually, it's pretty fun to play around with. Eventhough I don't really know C++.