People says SDL is good. How good is good..?

Started by
22 comments, last by nuvem 19 years, 2 months ago
"SDL really eats up my cpu."
Are you sure it wasnt one particular badly coded program or are you claiming every SDL program "eats your cpu" ??

SDL is pretty good but a bit low level. it would be nice if there were an actual usable game library built on top of it which can efficiantly handle sprites, hardware surfaces, dirty rectangles, widgets, sound etc etc. So far there is only Kyra which isn't very good, especially with the license. Anyway SDL sure makes porting to Mac and Linux easier, I've heard. Supposedly you can recompile the same SDL program with few changes on most platforms. Like I say I have yet to test that.


Advertisement
Quote:Original post by Spudder
So long as your not planning on using SDL's own graphic routines then you should be fine.


What graphics routines?

SDL doesn't have a built-in graphics library. It's like DirectX; it has pixel plotting support and blitting support and hardware double buffering and thats about it for built in stuff. You program everything else.
Quote:Original post by Spudder
So long as your not planning on using SDL's own graphic routines then you should be fine.


What graphics routines?

SDL doesn't have a built-in graphics library. It's like DirectX; it has pixel plotting support and blitting support and hardware double buffering and thats about it for built in stuff. You program everything else.
Quote:Original post by Drew_Benton
Quote:Original post by clayasaurus
it has been used in a wide variety of commercial games, including unreal tournament 2004.


I found this quote online
Quote:Unreal doesn't use SDL on Windows because the WinDrv module (as opposed
to the SDLDrv module) has a few extra features, such as hooks for speech
recognition, etc, since that code is tied tightly to the Windows API.

Plus, UnrealEd needs multiple windows, which SDL doesn't provide at this
time, and the game is primarily targetted at Direct3D on Windows, which
SDL obviously doesn't provide.


From an employee at SDL. So it can be seen that it is indeed *good*.

I think SDL is great for fun games, but I would much rather use an OpenGL library to handle the base of a professional game or 3D engine. GLFW is what I am going to try out for our current game...

I would say take a look into it. Here is a release page from Programmers Heaven that shows great featues -
Quote:GLFW, in short, is a link library that constitutes a powerful API for handling operating system specific tasks.

It also provides functions for reading a high precision timer, using OpenGL extensions, creating and synchronizing threads, reading textures from files, and more.

GLFW is available for Windows, Unix-like systems running the X Window System (such as Linux, IRIX and Solaris), Mac OS X, AmigaOS and DOS.

The framework is small -- the Windows DLL is only 35 KB. Some of the core features of GLFW include:

* Very easy to use API (similar to the OpenGL API)
* No system specific coding necessary
* Keyboard, mouse and joystick input
* High precision timer
* Multi threading support
* Texture loading support (TGA format files)
* Support for many popular C/C++ compilers
* Support for Borland Delphi
* Support for Microsoft Visual Basic
* Support for MASM32
* Can link either statically or dynamically with your applications (no need for a separate DLL if you don not want it)


You can even take a look at the User's guide. Now the point of my post is not to start a flamewar of which is better - I'm just pointing out there are a lot of under-hyped alternatives that are just as good if not better than SDL if you are intrested in all of your options.

- Drew


I'm also using GLFW because i find that it is lightweight and i don't need most of the features of SDL.
Quote:Original post by Drew_Benton
I think SDL is great for fun games, but I would much rather use an OpenGL library to handle the base of a professional game or 3D engine.


I fail to see how that is incompatible. You can use SDL for windowing, sound and input, and GL for rendering.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Quote:Original post by Fruny
I fail to see how that is incompatible. You can use SDL for windowing, sound and input, and GL for rendering.


Ok I will explain my views on this matter, of course this will be a longer post, and the longer a post is, the more chacnes for someone to point out logic flaws, but that's ok [wink]. Who knows, I might just prove myself wrong and you guys can ebd up saving me time and effort [smile]

Actually I think I will write a little article in word and then post it here, so you guys can wait in suspense. I am starting now.

- Drew
<Insert Suspense Here>
What is there to argue or "explain"? I've used SDL for years and there's nearly nothing you cannot do with it. You can definatly write "pro" games with SDL, with or without OpenGL. Yet OpenGL is quite easy to use with SDL. SDL certainly makes certain things easier. If you don't care about MAC or Linux, code in straight Windows API if that's what suits you, but don't bash a good lib out of ignorance. GLEW seems good but not if you need software blitting, im just that it possibly can't use Direct3D, where SDL can.
Ok Fruny everyone I have written a little article on my opinions on the whole SDL vs GLFW issue. It was too long to be posted here. You can find it
here on my web page. Feel free to PM me or post responses to it. I hope this can come of some use for someone [smile].

- Drew

This topic is closed to new replies.

Advertisement