Jump to content
  • Advertisement
Sign in to follow this  
gumpy

SDL and cross-platform development

This topic is 4866 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've been looking into SDL for cross-platform development under both windows and linux. before i spend more time learning the libraries inside and out, i have some questions. are there any "catches" to the LGPL that i should be aware of? would anyone recommend a different library or collection of libraries? where can i find extensive, up-to-date tutorials covering preferably all of the SDL libraries? what is the airspeed velocity of an unladen swallow?

Share this post


Link to post
Share on other sites
Advertisement
Well, here's a couple of answers...

As far as the license goes... if you dynamically link to the SDL library (or any LGPL library for that matter.. dll's on win32, .so on linux), you are fine... you don't have to release your source code. However, if you statically link, you need to release your source code...

The only other library I know of that is similar to SDL for cross-platform development is Allegro... it is similar, but provides more functionality than SDL.. whether you want it or not.

I'm not sure about tutorials for SDL.. I'm sure google would return some interesting links.. however, "Programming Linux Games" by No Starch Press is pretty good for an introduction to SDL and also to use as a reference. Also, the SDL docs that come included are essential for figuring out how to do what you want..

Hope this helps..

Share this post


Link to post
Share on other sites
I don't know anything about the LGPL, but I've been using SDL for some time now, and I highly recommend it. It's easy to use, is cross-platform, and you can use it with OpenGL. As for tutorials, check Tutorials under Documentation on the SDL site. And heres an interesting link about your last question [smile]. Hope this helps.

Edit: Damn, gotta learn to write faster.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I prefere using Allegro : www.allegro.cc/about.php, it's low level but complete.
it features images & sprites blitting, rotating, scaling and blending, gui, datafiles, compression, wav & midi and OpenGl support through AllegroGL

Share this post


Link to post
Share on other sites
Quote:
Original post by morx
As far as the license goes... if you dynamically link to the SDL library (or any LGPL library for that matter.. dll's on win32, .so on linux), you are fine... you don't have to release your source code. However, if you statically link, you need to release your source code...

that's what i thought. i just wasn't sure if there was anything sketchy in there somewhere.
Quote:
The only other library I know of that is similar to SDL for cross-platform development is Allegro... it is similar, but provides more functionality than SDL.. whether you want it or not.

i thought allegro was just a windows library. learn something every day.
Quote:
I'm not sure about tutorials for SDL.. I'm sure google would return some interesting links.. however, "Programming Linux Games" by No Starch Press is pretty good for an introduction to SDL and also to use as a reference. Also, the SDL docs that come included are essential for figuring out how to do what you want..

actually that's where i started, PLG and the html SDL docs. i'm still hoping to find some nicely formatted and organized html tutorials somewhere. thanks for the reply.

Share this post


Link to post
Share on other sites
thanks for the replies. i'm kinda drawn between sdl and allegro now. looks like allegro may be a better choice for 2d graphics.

Share this post


Link to post
Share on other sites
Here's a thread from a while back that debated SDL versus Allegro that you might want to read to make your decision. I've never used Allegro, but SDL has been working great for me from day 1 so I have no reason to switch. [smile]

Share this post


Link to post
Share on other sites
Quote:
Original post by morx
As far as the license goes... if you dynamically link to the SDL library (or any LGPL library for that matter.. dll's on win32, .so on linux), you are fine... you don't have to release your source code. However, if you statically link, you need to release your source code...


My understanding of statically linking SDL to your app is that instead of releasing your source code, you also have the option of releasing your object code instead (so users can relink the app). However, in practical terms this isn't all that great because you're essentially making the program freely available.

But yes, dynamically link to SDL and you're fine.

Personally I somewhat wish SDL had chosen to go with a different license - something like the MIT license, but I can understand their reason for using the LGPL.

Share this post


Link to post
Share on other sites
I've tried out both Allegro and SDL, and I preferred SDL in the end. Allegro gives you more functionality up front, but SDL gives you much more flexibility in how you do things. More room to grow, so to speak.

A good place to start off on SDL tutorials is the Cone3D series of tutorials: http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/index

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!