The Blog of Anders Nissen

tirsdag, marts 08, 2005

Experinces With SDL

SDL (Simple DirectMedia Layer) is a "cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer".

It makes it simple to use low-level communication with the hardware to draw single pixels on the screen, for instance. It's mostly used for making games, but could be used for almost any type of application.
Where the functionality of SDL ends, the huge selection of extra function-libraries take over, so the possibilities are almost endless, whatever you might need.

My experience with SDL has been quite positive. It's is really easy to use, but because it's pretty low-level you sometimes have to re-invent the wheel. That is both a good thing (you can implement things the way you like and make them more specific to what you need) and a bad thing (it takes time, introduces bugs and is almost always less optimized than "professional" solutions).
But, of course, if you don't want to implement functions for drawing basic geometry, playing and mixing sound and music or handling pictures, you can just download a library that does all the hard work for you.

If you need a simple, easy-to-use API for a platform independent 2D game that needs to be able to run on ancient hardware, SDL is the way to go! Even if you're doing something completely different you should go ahead and take a look at SDL.

SDL website: LibSDL.org

2 Comments:

  • Yes, I'm using SDL to now as you can see from my blog how I make my game and I found it's really easy to use, but some slow at least in 1.2.8 version. May be I wrong, you decide...

    By Anonymous Anonym, at 10:00 PM  

  • Yep, SDL is very nice to use, and it being cross-platform is also a large plus. If you design your game wisely and optimize the code, SDL ought to be more than adaquit for most games.

    Nice blog you've got there, by the way. I think I'll drop by there from time to time ;)

    By Blogger Anders Nissen, at 10:21 PM  

Send en kommentar

<< Home