Alternatives to SDL?

Started by
9 comments, last by 23yrold3yrold 19 years, 2 months ago
Hey, I'm working on making a game using SDL and OpenGL and recently began wondering if there are any other alternatives for my uses of SDL. Here's what: I use SDL for opening a window, getting keyboard input, and loading images, and I love that it's cross platform and requires very little effort on my part to get my game compiling under a different OS. However, I don't really like the license. Maybe I'm wrong and therefore making a complete ass of myself by posting this, but my understanding is that I have to provide the source code to my game wherever I'm distributing the game itself. Right? I think open source is cool, but should be optional. BUT, this isn't a discussion on open source software, I was just wondering if anybody knows of free [and cross-platform] libraries (under a license that won't require me to release my own source) for: -Opening Windows -Getting keyboard input (in a bool keys[] kind of way) Thanks for any help, -Nick
Advertisement
The license only requires that the user can change the SDL-part of your game. If you use SDL as a .dll that is automatically fullfilled. You don't need to release the source of your game.
You don't need to relese your source, that only applies to the GPL. SDL is licenced under the LGPL which can be used in commercial applicaions etc.
Allegro?

To my knowledge, it only becomes a problem if you plan on selling your software that uses SDL. Details about the licensing are available on their website.

Quote:To comply with this license, you must give prominent notice that you use the Simple DirectMedia Layer library, and that it is included under the terms of the LGPL license. You must include a copy of the LGPL license.
You must also do one of the following:

1. Include the source code for the version of SDL that you link with, as well as the full source or object code to your application so that the user can relink your application,
or
2. Include a written offer, valid for at least three years, to provide the materials listed in option 1, charging no more than the cost of providing this distribution,
or
3. Make the materials listed in option 1 available from the same place that your application is available.
Rob Loach [Website] [Projects] [Contact]
Been a lot of discussion on this topic lately, or maybe I'm just noticing it more. Anyway check out these libraries. GLFW, OGLWFW, freeGLUT. GLFW is under the zlib license. You might also check out Allegro, not sure about the license though.

GL Framework
OpenGL Window Framework
freeGLUT
Quote:Original post by Trap
The license only requires that the user can change the SDL-part of your game. If you use SDL as a .dll that is automatically fullfilled. You don't need to release the source of your game.

That's what I thought at first, but I became confused about it after reading this bit:
Quote:... as well as the full source or object code to your application so that the user can relink your application,...

What does that mean? Just give people all the lines in which I call SDL functions?
Quote:... as well as the full source or object code to your application so that the user can relink your application,...

Your executable is object code. relinking happens every time a .dll is loaded.
On the topic of GLFW, take a look at my article I wrote for this post on "SDL vs GLFW". I plan on using GLFW myself. I go over the window and input featues as well. It's far from being complete, but it should server as a good starting point.

- Drew
Basically, using it as a .dll fulfills all those requirements of the license. If it required more, I don't think commercial cross-platform games would use it. As long as you feel it works for you, go ahead and use it.
Jolly good.

I guess I'll just continue with SDL then, but I'll be sure to look into GLFW too. Thanks, everybody, for the quick and informative responses. I appreciate the help!

-Nick

This topic is closed to new replies.

Advertisement