Sign in to follow this  

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

This topic is 4687 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm reading everywhere that SDL is great for a lot of things, but i wonder if it is good enough to be used in more professional applications, say an advanced/commercial 3D engine? Is it? [smile]

Share this post


Link to post
Share on other sites
For more powerful applications SDL is often used as the windowing/input API which enables you to use OpenGL for the more advanced graphics. Ogre for example uses it for just this purpose. So long as your not planning on using SDL's own graphic routines then you should be fine.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
It's great...right now I'm quite wasted...but...well it's geat to begin making games using it...then when you want to mahe more asvanx´ced games you can swich to open GL...

//walle

Share this post


Link to post
Share on other sites
But...I can say...SDL really eats up my cpu...I triaed to run a game I made with SDL when I had overclocked mu cpu like 400mhz...it restarted some times...

but it's greeat

//walle

Share this post


Link to post
Share on other sites
I use GLFW. But I'd say that what ever I do, SDL or GLFW will not be the first or second reason for unprofessional software I write! They are very good.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
"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.


Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Quote:
Original post by Drew_Benton
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


BTW, You can do the no-<windows.h> trick with SDL too. Just include "SDL_opengl.h" instead of:

#include <windows.h>
#include <GL/gl.h>
#include <GL/glu.h>

Share this post


Link to post
Share on other sites
Quote:
Original post by TravisWells
BTW, You can do the no-<windows.h> trick with SDL too. Just include "SDL_opengl.h" instead of:

#include <windows.h>
#include <GL/gl.h>
#include <GL/glu.h>


You know what, I knew that, but when I was writing that article this morning, I tried it and could not find the right hearder file to use, so I figured I was just missing that file. I just recently looked at the SDL 1.2.X change log for past revisions and saw that they added that around 1.2.3 IIRC. So I tried it again just now, and realized it's
#include <SDL/SDL_opengl.h>
for me. Heaven knows what I *tried* to include this morning [lol]. I will make that update with credit to you for poiting that out, but I will still keep my point because most people do not know about that really [wink]. Thanks for pointing that out as well as taking the time to read it [smile].


Quote:
Original post by Android_s
Lots and lots of intressting responses...even bornt an article [grin]
Thanks for all replies, i've gotten more than just a response to my question!


[smile] Well its one of those questions that a lot of people ask, and rather than always link back to ther posts, might as well have made one page with all my opinons on the two. Plus I needed an excuse to write an article. The last one I wrote was on installing dev-cpp. Heaven knows when that's going to appear on GD...And when it does, it's going to be so outdated!

- Drew

[edit] Page updated!

[Edited by - Drew_Benton on February 13, 2005 9:19:57 PM]

Share this post


Link to post
Share on other sites
Nifty, thanks for pointing out GLFW! It looks like exactly what I've been looking for, especially for input (my biggest issue w/ SDL).

Share this post


Link to post
Share on other sites

This topic is 4687 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this