Any good book or tutorial about SDL

Started by
7 comments, last by Biased turkey 22 years, 6 months ago
I,m a little familiar with Directdraw but would like to switch to the SDL API because it can be used with Linux too. I downloaded the SDL SDK ( windows version ) and was able to find a simple example on a German site. At least I was able to compile successfully a program that plots 1 single pixel on the screen.Soon I''ll be able to program Quake, after all Quake is just made of a few thousands pixels My question: Is there any good and complete book about SDL available? Yhe ideal book would be the one that starts from the basics and gradually create a simple but complete game project. The SDK included documentation just presents some snippets related to each function. Thanks in advance for any opinion, tip or advise I could get
Advertisement
SDL is not an API its an extension to OpenGL. You have to learn OpenGL first.

I suggest you get the book by Kevin and Dave (of GDNET) called:

"OpenGL Game Programming"

or go to

nehe.gamedev.net and take all of the tutorials.

After that you can learn the SDL which is for sound, input, the works.

"I''ve sparred with creatures from the nine hells themselves... I barely plan on breaking a sweat here, today."~Drizzt Do''Urden
------------------------------Put THAT in your smoke and pipe it
First, thanks for the NeHe link and the reference book about Opengl.I''m sure I''ll need them when I''ll start learning about Opengl after I''ll have mastered SDL.
I''m sorry to disagree with you, but SDL is NOT an extension of Opengl. The living proof is that I was able to compile a very very simple pixel plotting program ( 10 lines ) using the SDL SDK library without any kinf of Opengl installed on my computer.
Here is a copy of a few lines from the SDL manual:

SDL has the ability to create and use OpenGL contexts on several platforms(Linux/X11, Win32, BeOS, MacOS Classic/Toolbox, MacOS X, FreeBSD/X11 and Solaris/X11). This allows you to use SDL''s audio, event handling, threads and times in your OpenGL applications (a function often performed by GLUT).

Thanks again for the info.

quote:Original post by Drizzt DoUrden
SDL is not an API its an extension to OpenGL. You have to learn OpenGL first.


Taken from SDL''s homepage:
What is it?
SDL is a free cross-platform multi-media development API

On Windows system it actually makes us of the DirectX API.

As to the original question. I don''t know if there are any books about SDL but SDL''s homepage has more then enough demos and examples that should help you out.
quote:Original post by Drizzt DoUrden
SDL is not an API its an extension to OpenGL. You have to learn OpenGL first.

I suggest you get the book by Kevin and Dave (of GDNET) called:

"OpenGL Game Programming"

or go to

nehe.gamedev.net and take all of the tutorials.

After that you can learn the SDL which is for sound, input, the works.

"I''ve sparred with creatures from the nine hells themselves... I barely plan on breaking a sweat here, today."~Drizzt Do''Urden


Deeply wrong. SDL can interface with OpenGL for 3D graphics but it can do 2D or if you''re flashy software 3D on it''s own.
Now, I''m really confused.
Acraig wrote:
On Windows system it actually makes us of the DirectX API.

Could you please copy and paste any text from the SDL doc manual specifying that in order to run the SDL development kit the user must install any DirectX runtime library, or any DirectX SDK library?
In several SDL examples I had a look at, none has the directive
#include
Of course I might be completely wrong but someone has to prove that to me.
Thanks again for the feedback
Apology to Acraig.

I found the following on SDL FAQ:
Two versions, one safe for all systems based on Win32 APIs, and one with higher performance, based on DirectX APIs.
Safe version uses GDI for video display. High performance version uses DirectDraw for video display, taking advantage of hardware acceleration if available.
Safe version uses waveOut APIs for sound. High performace version uses DirectSound for audio playback.


Does SDL.dll detects if DirectX runtime libraries are installed?
Just curious
quote:Original post by Biased turkey
Does SDL.dll detects if DirectX runtime libraries are installed?
Just curious


I''m not sure, I''ve only used SDL under Linux. I''d be curious too, if you find out. Although you would be hard pressed to find a Windows machine that didn''t have the DirectX runtimes on it.



-------
Andrew

I finally found what looks to be a good book:
Programming Linux Games is the complete guide to developing Linux games, from Loki Software, the Linux gaming experts, and our latest Linux Journal Press title.

It looks like the book that has the best coverage of SDL.As SDL is completely platform cross portable I shouldn''t have too much problem to adapt the Linux examples for the Win version.
Of course, my holy grail is to be able to program SDL applications on the Linux OS

This topic is closed to new replies.

Advertisement