Simple DirectMedia Layer
Simple DirectMedia Layer
|
|
---|---|
![]() |
|
Basic data
|
|
developer | Sam Lantinga and the SDL community |
Publishing year | 1998 |
Current version |
1.2.15 ( January 21, 2012 ) |
operating system | Linux , macOS , Windows , Android , iOS |
programming language | C. |
category | Program library |
License | zlib license ( Free Software ) before SDL 2.0.0: LGPL |
German speaking | Yes |
www.libsdl.org |
Simple Direct Media Layer (short SDL ; English for "simple direct media layer") is a free multimedia - library for different operating systems . From version 2.0 it is available under the zlib license . All older versions prior to 2.0 are under the GNU Lesser General Public License (LGPL).
concept
The library provides a platform-independent interface (API) for graphics, sound and input devices, which is mainly suitable for developing games and multimedia applications. By supporting many different platforms, high portability and platform independence can be guaranteed for an application . With this property, SDL can also be understood as middleware .
![](https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/SDL_Layers-german.svg/220px-SDL_Layers-german.svg.png)
There are official and unofficial SDL connections for dozens of programming languages, which enable integration into many projects and development contexts.
By using the liberal zlib license , the SDL libraries can be used without problems in terms of licensing law in binary and source code form in both open source (GPL-compatible) and proprietary projects (no copyleft ).
SDL is written in C and is characterized by its compact code, which should make this library easy to learn even for beginners. Due to its widespread use and proximity to the open source movement, there are many freely available sample programs for various use cases that show how the library can be used.
distribution
The number of games and programs written with it is indicative of the popularity and notoriety of SDL. For example, the MobyGames game database lists 105 games in 2012, while almost 700 games are listed on the SDL website itself. Well-known commercial examples are Angry Birds or Unreal Tournament , from the open source area z. B. OpenTTD , The Battle for Wesnoth or Freeciv .
In the case of cross-platform game publications, SDL is often used as the abstraction library, as the effort is significantly reduced compared to implementations with the respective native platform APIs. One example are the mostly SDL-based Linux, Mac and Android versions contained in the Humble Indie Bundles .
SDL is also often used for (later) porting to new platforms, e.g. B. Homeworld for the Pandora - handheld or Jagged Alliance 2 for Android - smartphones .
Non-game applications based on SDL are e.g. B. the emulators DOSBox and VisualBoyAdvance .
SDL was also used at universities and in teaching in courses on multimedia and computer science .
Several books have also been published on developing with the SDL libraries (see the literature section below).
Development history
Originated at Loki Software
SDL was developed by Sam Lantinga while he was a senior programmer (1999-2001) at Loki Software . The Simple DirectMedia layer forms (often in connection with the OpenGL and OpenAL interfaces) the basis for some commercial game titles for Linux that have been ported by Loki, such as: B. Civilization: Call to Power , Descent³ or Sid Meier's Alpha Centauri .
Even then, SDL was placed under the LGPL . With this step, SDL quickly became known as it could now be used to develop both proprietary and free software .
Further development through the community
Although Sam Lantinga joined Blizzard Entertainment from Loki Software in 2001 , he still manages SDL's development and remains one of the most active SDL developers. Ryan C. Gordon , another ex-Loki employee, also continues to work on and with SDL z. B. for the Linux and Mac versions of games in the Humble Indie Bundle .
![](https://upload.wikimedia.org/wikipedia/commons/thumb/2/22/Ryan-Gordon-SELF-2009.png/220px-Ryan-Gordon-SELF-2009.png)
There is now a large community and other voluntary helpers who participate in the further development.
There are SDL 1.2 connections from other manufacturers for over twenty programming languages.
SDL 2.0
The further development of version 1.2 was planned as version 1.3 and was published in August 2013 as version 2.0. Additional capabilities compared to the previous version are support for operation on multiple monitors, two-dimensional graphics accelerated by hardware and better support for Unicode . Furthermore, support for multi-touch and haptic input devices, e.g. B. with force feedback . In contrast to earlier versions, SDL 2.0 uses the zlib license . By this it should be possible, proprietary products ( closed source ) develop which ( "SDL then statically bind left ") may.
Snapshots from February 2012 change the version number from 1.3 to 2.0. The first stable version of SDL 2.0 was released on August 13, 2013.
The current stable version SDL 2.0.12 was released on March 11, 2020.
Connections to SDL-2.0 exist in mid-2014 for C, C ++ and three other programming languages.
Functionality
The SDL library contains functionalities that are particularly necessary for multimedia applications for which a widespread, platform-independent and simultaneous high-performance API does not exist:
- Video output
- Set video mode, access to the frame buffer , use hardware acceleration for graphics operations, optionally via EGL
- Event handling
- Events for keyboard , mouse , program end and visibility of the program
- Audio output
- In 8 and 16 bit, mono / stereo
- Audio CDs
- Full audio CD API (no longer in SDL 2.0)
- Threads
- Thread API, semaphore , mutex objects and condition variables for synchronization
- Timer
- Query periodically, waiting time, elapsed time
- Conversion of the byte order
- Big Endian / Little Endian
The Simple DirectMedia Layer itself does not provide any functions for 3D graphics, because with OpenGL a widespread, platform-independent 3D API is already available. SDL was designed from the outset to interact with OpenGL and is intended to specifically cover the multimedia aspects that lie outside the OpenGL functionality. Therefore, both libraries complement each other perfectly and also 3D games such as B. Tux Racer are possible without any problems.
Other possible uses such as Internet socket abstraction or font access are deliberately not officially included in SDL, but offered as extensions by other providers on the LibSDL homepage.
Supported Platforms
![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Linux_kernel_and_OpenGL_video_games.svg/220px-Linux_kernel_and_OpenGL_video_games.svg.png)
Officially supported platforms:
Support included in SDL code but not officially supported:
- AmigaOS , AROS
- Atari
- BeOS
- BSD derivatives ( FreeBSD , OpenBSD , NetBSD )
- Unix ( AIX , Solaris , IRIX , Tru64 UNIX , QNX )
- Dreamcast
- Microsoft Windows CE
- MorphOS
- Nintendo DS (since SDL 1.2.12)
- Pandora (since SDL 2.0)
- Symbian OS (since SDL 1.2.12)
SDL runs on all Unixoid platforms as long as they support the POSIX standard.
Other platforms supported:
- DOS ( FreeDOS and similar; Windows versions run with the help of HX DOS Extender )
- Dingoo A320
- GP2X
- Haiku
- SkyOS
- Xbox
Exemplary gallery of SDL-based games
See also
literature
- Alberto García Serrano: Programación de videojuegos en SDL . Ediversitas, ISBN 84-95836-08-4 (book on the use of the SDL in video game development, Spanish).
- Ernest Pazera: Focus On SDL . Muska & Lipman / Premier-Trade, ISBN 1-59200-030-4 (another book on SDL, which also deals with other libraries for the Simple DirectMedia Layer, such as SDL_net).
- Ron Penton: Data Structures for Game Programmers , Muska & Lipman / Premier-Trade, ISBN 1-931841-94-2 (mainly deals with the data structures of a game, but also contains examples with the SDL).
- John R. Hall: Programming Linux Games . No Starch, ISBN 1-886411-49-2 (First book dealing with the SDL. Also contains information about programming in Linux in general and network programming), online version: overcode.net ( Memento from January 22, 2003 in Internet Archive ; PDF) LaTeX sources ( Memento from February 14, 2003 in the Internet Archive ).
Web links
- Official SDL international website
- Official German SDL website
- Simple DirectMedia Layer at MobyGames (English)
- Technical information
Individual evidence
- ↑ Sdl 1.2.15 released! . (accessed June 2, 2019).
- ↑ a b Middleware: SDL Group Description ( English ) MobyGames . May 18, 2012. Retrieved May 18, 2012: “ Games that use the very portable Simple DirectMedia Layer. "
- ↑ a b SDL Language Bindings. Archived from the original on January 16, 2013 ; accessed on July 12, 2009 .
- ↑ a b SDL Language Bindings. Archived from the original on August 21, 2013 ; accessed on October 25, 2013 .
- ↑ Comment on the zlib license at the FSF (English)
- ↑ Games ( English ) libsdl.org. May 18, 2012. Archived from the original on June 29, 2010. Retrieved on May 18, 2012.
- ↑ SDL Testimonials . Galaxygameworks.com. Archived from the original on July 16, 2011. Retrieved February 1, 2012.
- ↑ a b OpenTTD Development . Retrieved October 2, 2013.
- ↑ a b CompilingWesnoth . February 27, 2010. Retrieved March 19, 2010.
- ↑ SDLClient - Freeciv.org . Freeciv.wikia.com. Retrieved March 19, 2010.
- ↑ may88: Game of the Week # 3 - Homeworld SDL ( English ) pandorapress.net. June 23, 2011. Archived from the original on August 30, 2011. Retrieved on May 8, 2012: “[…] released port of HomeworldSDL. Forum member Edglex enables your Pandora to experience the excellent work done by the guys at HomeworldSDL. "
- ↑ JA2 Stracciatella Feedback → Jagged Alliance 2 Android Stracciatella Port RC2 Release - please test ( Memento from October 23, 2012 in the Internet Archive ) on the Bear's Pit Forum, October 3, 2011 (English)
- ↑ Ben Kuchera: The latest Humble Bundle offers amazing games, promotes multiplatform releases ( English ) In: ars technica . December 14, 2011. Retrieved February 18, 2012: " Some developers are ready for it from day one, but usually a game is Windows-only and needs to get ported to Mac and Linux. Ryan Gordon and Edward Rudd have been instrumental in this, but a lot of developers will do ports internally as well. "
- ↑ Ben Kuchera: The latest Humble Bundle offers amazing games, promotes multiplatform releases ( English ) In: ars technica . Retrieved May 6, 2012.
- ↑ pro-linux.de
- ↑ SDL: A Quick Introduction to SDL 1.3 ( Memento of June 24, 2012 in the Internet Archive )
- ↑ Arnin Ronacher: A Gentle Introduction into SDL 1.3 ( English ) April 6, 2011. Archived from the original on January 4, 2012. Retrieved on May 30, 2012.
- ↑ SDL 1.3 licensing terms ( English ) Sam Lantinga. April 7, 2011. Retrieved August 21, 2011.
- ↑ SDL 2.0.0 Released! August 13, 2013, accessed October 25, 2013 .
- ↑ Index of / release. Retrieved May 15, 2020 .
- ↑ The Simple Directmedia Layer documentation ( Memento from April 15, 2013 in the Internet Archive )
- ↑ Ryan C. Gordon: README.Platforms ( English ) libsdl.org. April 9, 2012. Archived from the original on January 20, 2012. Retrieved on May 7, 2012: “ This is a list of the platforms SDL supports, and who maintains them. "
- ↑ SDL for Android in 10 drunken steps JD William on July 27, 2011 (English)
- ↑ a b SDL Release Notes. January 21, 2012, accessed June 29, 2012 .
- ↑ libsdl.org website: about section. February 8, 2006, accessed June 29, 2012 .
- ↑ Oolite . Retrieved March 19, 2010.