LinuxDevCenter.com

oreilly.comSafari Books Online.Conferences.

We've expanded our Linux news coverage and improved our search! Search for all things Linux across O'Reilly!

Search
Search Tips

advertisement

Listen Print Discuss Subscribe to Linux Subscribe to Newsletters

SDL: The DirectX Alternative

by Howard Wen
09/21/2001

There's a good chance that the next Linux game you play, especially if it's a commercially sold title, was made using Simple DirectMedia Layer.

SDL, for short, is a multimedia library API which provides low-level access to a system's video framebuffer, sound output, and input devices including keyboard, mouse, and joystick. It's used in emulators and MPEG viewers to handle the graphics and sounds of these programs, but SDL has mostly become known as an essential toolkit for Linux game development. The Linux port of Civilization: Call to Power used SDL.

In its most basic capabilities, SDL is similar to Microsoft's DirectX API. The big difference is that, besides being open source, SDL supports multiple operating systems. Other than Linux, SDL is available as BeOS, MacOS, Solaris, FreeBSD, IRIX, and, yes, even Windows 32-bit versions. Additionally, the API has bindings to other languages, a few of which are Perl, PHP, and Python.

Written in C (and also working natively with C++), the latest version, SDL 1.2, is available under the GNU Lesser General Public License version 2 or later.

This alternative to Microsoft's well-known and oft-used DirectX comes courtesy of Sam Lantinga, 27, who presently works as a software engineer for Blizzard Entertainment (the makers of Diablo) in Irvine, California. He first made a name for himself in the games industry as one of the prominent players in the Linux gaming development community. His last job was as a lead programmer for Loki Software, renowned for its quality Linux translations of Windows and Macintosh games. (The last projects that he worked on while at Loki were Tribes 2 and Kohan.) Lantinga got his start in Linux game programming while in college when he ported a Macintosh game called Maelstrom to Linux.

Comment on this articleDo you have any projects underway or completed that use SDL? Also, any general thoughts?
Post your comments

The genesis for the SDL library came about while he worked on the Windows port of a Macintosh emulator called Executor. He figured that the code he created for the emulator's graphics, sound, and game controller interfaces could be extracted and used separately across other platforms. "I thought it would be handy to write a library to encapsulate this functionality so that other people could use it," he says.

Lantinga started work on what would become SDL in the summer of 1997 and made the first public release of it, Version 0.3, in October of that year.

Pages: 1, 2, 3

Next Pagearrow




Tagged Articles

Be the first to post this article to del.icio.us

Recommended for You

  1. Cover of Essential CVS
    Essential CVS
    Print: $39.95
  2. Cover of How Linux Works
    How Linux Works
    Print: $37.95
    Ebook: $29.95
  3. Cover of Learning Unix for Mac OS X
    Learning Unix for Mac OS X
    Print: $19.95
  4. Cover of Book of Webmin
    Book of Webmin
    Print: $34.95

Sponsored Resources

  • Inside Lightroom
Advertisement

Sponsored by:

O'Reilly Media

©2009, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Academic Solutions
Authors
Contacts
Customer Service
Jobs
Newsletters
O'Reilly Labs
Press Room
Privacy Policy
RSS Feeds
Terms of Service
User Groups
Writing for O'Reilly
Content Archive
Business Technology
Computer Technology
Google
Microsoft
Mobile
Network
Operating System
Digital Photography
Programming
Software
Web
Web Design
More O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com

Partner Sites
InsideRIA
java.net
O'Reilly Insights on Forbes.com