SDL
libsdl.org says that 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 has been used as the basis for many published games, most notably the many titles produced by the (now defunct) Loki Games.
It is important to note that SDL is licensed under the LGPL, which does place some restrictions on its use. You are permitted to use SDL for commercial applications, but you must either dynamically link to the SDL libraries, or make available your program's compiled object files, thereby allowing users to re-link with newer versions of the SDL library.
Features
| Feature | Yes | No |
|---|---|---|
| sound effects and music | X | |
| input | X | |
| timers | X | |
| font rendering | X | |
| windowing | X | |
| scripting | X | |
| GUI | X | |
| OpenGL | X | |
| networking | X | |
| math | ? | |
| 3d math | ? | |
| file management | X | |
| threading | X |
Platforms
- BeOS
- GNU/Linux
- MacOS (Classic and OS X)
- UNIX (including BSD/OS, Darwin, FreeBSD, Irix, OpenBSD, Solaris, QNX)
- Windows
- Some support for AIX, AmigaOS, MorphOS, Atari, Dreamcast, NetBSD, OSF/Tru64, Playstation Portable, RISC OS, SymbianOS, Windows CE
Related Libraries
Tutorials and Source
Having trouble getting a solution to your problem? You can get help on the community forums or IRC
Want to see something here you can't find? Try making a request on the wanted pages list!
On the Wiki
C
General
Audio
See also SDL_mixer
Input
Video
- Displaying a Bitmap
- Displaying a Bitmap from a Custom Resource File using SDL_RWops
- Displaying a Bitmap from a zip file using SDL_RWops and zlib
- 2D Graphics
- Using SDL with OpenGL
- Using cairo and glitz with SDL
See also SDL_image.
Networking
Font Rendering
Miscellaneous
C++
Creating a Complete 2D Engine
- Engine development overview
- Designing the System Core
- Designing the Graphics Core
- Designing the Input Core
- Designing the Sound Core
Source Code
The source code files listed below do not have accompanying tutorials.
- BlockBreak - Breakout clone. Linux binaries only.
- Eat
- Paddles - Pong clone. Linux binaries only.
- Sokoban clone
- Throw the Bouncing Penguin Demo - By Ricardo Cruz
Delphi
Related
Template:SDL:Tutorials:Related
External Resources
- Aaron's Game Programming Tutorials
- An article on using Hardware Surfaces with SDL
- Cone3D SDL Tutorials
- DevHub - SDL Tutorials
- Mars, Land of No Mercy - SDL Samples
- Roger's SDL Tutorials
- SDL_mixer Documentation
- Official SDL Website
- SDL Documentation Project
- Using SDL & OpenGL together by DavW
- jnrdev - 2d Jump and Run Tutorials using SDL
- Sol Tutorials
- Lazy Foo's SDL Tutorials: Beginning Game Programming
- Setting up SDL with MinGW and Eclipse
- Matthew Casperson's SDL Programming Tutorial
- Game Programming Tutorials: SDL Tutorial Series
Extensions to SDL
- Widget Sets
- ParaGUI
- Guichan
Related Weblinks
- SDL website
- SDL_ttf website
- SDL_image website
- SDL_mixer website
- SDL_net website
- SDL Wiki
- Sol's SDL graphics/game coding tutorial
