Advertisement

what is SDL?

Started by December 09, 2002 04:36 PM
12 comments, last by venomous3d 21 years, 11 months ago
Ive been looking for some game tutorials and keep coming accros SDL. what is it? How does it pertain to C++ and games? -Tyler
www.google.com
type: "SDL"

click first link.

Read:

"Simple DirectMedia Layer is a cross-platform multimedia library designed to provide fast access to the graphics framebuffer and audio device. It is used by MPEG playback software, emulators, and many popular games, including the award winning Linux port of "Civilization: Call To Power." Simple DirectMedia Layer supports Linux, Win32, BeOS, MacOS, Solaris, IRIX, and FreeBSD.

SDL is written in C, but works with C++ natively, and has bindings to several other languages, including Ada, Eiffel, Java, ML, Perl, PHP, Pike, Python, and Ruby. "
"1 is equal to 2 for significantly large quantities of 1" - Anonymous
Advertisement
"And with a quick stroke of genius I opened my web browser and went to Google. I entered in the search of "SDL" just to see what would come up, and I was amazed! The first link that was there was to the SDL website! It was like magic!" said Bob to the young boys gathered around the campfire. And the boys stared back in amazement. It had been a long weekend for the boys, with the bear attack and all. But somehow Bob always got them through. So they sat attentively to his amazing story with wonder and awe...

Always remember, you''''re unique. Just like everyone else.
Always remember, you''re unique. Just like everyone else.Greven
Stands for Simple DirectMedia Layer, its a cross platform multimedia library.
Think this thread is closed now.
The man should be happy. His question is answered.

I beat you all to the flame, so just walk away. Another chance will soon arise
"1 is equal to 2 for significantly large quantities of 1" - Anonymous
Thanks a$$holes... but really, answer my question:
howDoesThisRelateToGames(){
Can something like this replace DirectX? Why is used? what purpose does it serve? It is esier than directX? What are its limitations?
}

int main(){
howDoesThisRelateToGames();
return 0;
}
Advertisement
I''m not an asshole. Just not overly friendly to people who ask newbie questions without first looking. (or taking time to phrase the question in a good way)

And I quote: "what is [sdl]? How does [sdl] pertain to C++ and games?"

THAT is what you asked. So that is what we answered.

However, now that you have taken the time to refine your question, people can refine there answers.

>> Can something like this replace DirectX?
Nothing will replace DirectX for a long time.
However, it is an alternative for many purposes. See SDL web site for more info.

>>Why is used?
People like simple quick access to 2d graphics, without writing reams of code.
It has some completeness to it I believe. (though, back before I switched to directx I used Allegro, not SDL)
Some of the completeness is the ability to load images, and play sounds -- whereas with directx you need to write a few hundred lines of code right away to do those sorts of things.
I am guessing its major selling points are the ones I mentioned in first point. Fast, Free, Cross-Platform.

>>What are its limitations?
It won''t slice, or dice your vegetables.
Just blit stuff really fast, and work on a few different platforms. See webpage for more details.
"1 is equal to 2 for significantly large quantities of 1" - Anonymous
see, that wasnt so bad. Thats all I wanted to know. And secondly, a n00b in C++ != a n00b in technology. If I wanted you guys to just search the web for me I would have done it myself... so maybe, just maybe you could have given me the benefit of the doubt and explained its uses and why its a logical choice. Things that I couldnt have gotten from hitting google and checking out the page descriptions. In any event, I downloaded the Lib and have found some tuts. I would like to do some simple ''paste a bitmap'' to the screen thing, and eventually sprites. Is SDL gonna work for that?

-Tyler
Yes.
"Discipline is never an end itself, only a means to an end." - Robert Fripp
Yes, SDL can replace directx, in your code at least. it actually uses some directx when compiled on windows. but, it is easy to use and works on many operating systems. It simplifies intitialization of OpenGL. The only part of directx sdl doesnt do is 3d audio, but openAL and i thnk fmod are good for that. Actually, you have to use SDL_net for networking, but thats basically part of SDL, its just a separate download because it is optional. SDL also simplifies window creation, image loading and other things. You should check it out. You really can write code that compiles on all platforms. I reccomend using sdl in almost any program.

yes, SDL should work for your sprite program.

This topic is closed to new replies.

Advertisement