Simple and Fast Multimedia Library
Graphics and Multimedia Library written in C++ From Wikipedia, the free encyclopedia
Simple and Fast Multimedia Library (SFML) is a cross-platform software development library designed to provide a simple application programming interface (API) to various multimedia components in computers. It is written in C++ with bindings available for Ada, C, Crystal, D, Euphoria, Go, Java, Julia, .NET, Nim, OCaml, Python, Ruby, Rust, Node.js, Beef and Zuko.[3] Experimental mobile ports were made available for Android and iOS with the release of SFML 2.2.[4]
![]() SFML logo | |
Original author(s) | Laurent Gomila, and others |
---|---|
Developer(s) | SFML Team |
Initial release | August 9, 2007 |
Stable release | 3.0.1
/ April 23, 2025 |
Repository | |
Written in | C++ |
Operating system | Linux, macOS, Windows, FreeBSD |
Type | API |
License | zlib License[1][2] |
Website | www |
SFML handles creating and input to windows, and creating and managing OpenGL contexts. It also provides a graphics module for simple hardware acceleration of 2D computer graphics which includes text rendering using FreeType, an audio module that uses OpenAL, replaced by miniaudio as of v3.0.0,[5] and a networking module for basic Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) communication.
SFML is free and open-source software provided under the terms of the zlib/png license. It is available on Linux, macOS, Windows and FreeBSD.[6][7] The first version v1.0 was released on 9 August 2007, and the latest version, v3.0.0, was released on 21 December 2024.[8]
Software architecture
Summarize
Perspective
Modules
SFML consists of various modules:
- System – vector and Unicode string classes, portable threading and timer facilities
- Window – window and input device management including support for joysticks, OpenGL context management
- Graphics – hardware acceleration of 2D graphics including sprites, polygons and text rendering
- Audio – hardware-accelerated spatialised audio playback and recording
- Network – TCP and UDP network sockets, data encapsulation facilities, HTTP and FTP classes
While the graphics module is one of the main features of SFML, developers who are interested in only creating an environment to program directly in OpenGL can do so by using the Window module on its own without the graphics module. Similarly, the other modules can also be used independently of each other, except for the System module which is used by all of the modules.
Language bindings
SFML is written in C++ and provides a C++ interface (it also provides a C interface through the official CSFML binding). Several language bindings exist that enable using SFML in other programming languages.[3]
This table lists supported bindings for SFML as of 2024[update].
Name | Language | Supported version |
---|---|---|
ASFML | Ada | 2.6 |
CSFML1 | C | 2.6 |
BeefSFML | Beef | 2.5 |
SFML.Net1 | .NET | 2.6 |
CrSFML | Crystal | 2.6 |
bindbc-sfml | D | 2.5 |
DSFML | D | 2.1 |
EuSFML2 | Euphoria | 2.4 |
csfml-fpc | Free Pascal | 2.5 |
go-sfml | Go | 2.5.1 |
GoSFML2 | Go | 2.0 |
Hackage | Haskell | 2.3 |
JSFML | Java | 2.2 |
CSFML.jl | Julia | 2.5.1 |
nim-csfml | Nim | 2.3 |
Ocsfml | OCaml | 2.2 |
OCaml-SFML | OCaml | 2.5.1 |
PasSFML | Pascal | 2.4 |
pySFML | Python | 2.3.2 |
rbSFML Archived 2018-05-27 at the Wayback Machine | Ruby | 2.3.2 |
rust-sfml | Rust | 2.6.1 |
zig-sfml | Zig | 2.6.1 |
sfml.js | Node.js | 2.5.1 |
zukoSFML | Zuko | 2.5 |
1 Official bindings
Unofficial add-ons
SFML provides the basic functions on which higher-level software can be built. Add-on libraries exist that provide added support for graphical user interfaces (GUIs),[9][10] 2D lighting,[11] particle systems and animation,[12] video playback[13] and tilemaps.[14]
Reception and adoption
Summarize
Perspective
SFML is primarily used by hobbyist game developers, small independent video game developers, and startup companies consisting of several developers at most. Because SFML does not require writing large amounts of code, it has also been adopted by many Ludum Dare participants.[15] Compared to older libraries such as Simple DirectMedia Layer (SDL) and Allegro, the SFML user base is relatively small but growing. As of 25 December 2024[update], its GitHub software repository has been starred by over 10,000 users.[16]
SFML has been used in teaching at universities and in scientific projects.[17][18][19][20][21][22]
Video game use examples
- Atom Zombie Smasher,[23] real-time strategy game.
- Away Team,[24] Simulation Interactive Fiction game.
- Chesster,[25] puzzle game.
- Cosmoscroll,[26] free open-source space-based shoot 'em up game.
- Crea,[27] moddable 2D sandbox game.
- Enchanted Forest[28]
- Extreme Tux Racer,[29] free open-source arctic racing game featuring Tux (using SFML since version 0.7).
- HolySpirit,[30] 3D isometric hack and slash game.
- Hope,[31] point and click adventure game (like Myst).
- I Can Transform,[32] 2D platform game for Android.
- Jin Conception,[33] 2D pixel art JRPG for Nintendo Switch.
- KeeperRL,[34] dungeon simulator with rogue-like and RPG elements.
- Kroniax,[35] minimalistic side-scroller, and the first SFML game for Android.
- Limit Theory,[36] infinite, procedural space game.
- M.A.R.S.,[37] multiplayer shoot 'em up game.
- Moonman,[38] pixel art exploration sandbox game.
- Open Hexagon,[39] free open-source Super Hexagon clone.
- Ovid The Owl,[40] puzzle platform game.
- Pioneers,[41] turn based exploration game with some RPG elements.[28]
- Postmortem: one must die,[42] narrative adventure game.
- Project Black Sun,[43] retro 2D side-scrolling video game.
- TacWars,[44] a puzzle RPG that pits Dwarves against Goblins.
- The Duke,[45] action platform game.
- The Shooting of Isaac,[46] vertical shooter game.
- Vagante,[47] action RPG platform game.
- Zloxx,[48] 2D action platformer.
Further examples of games using SFML are listed on IndieDB.[49]
Other software use
- Aquila,[50] open source digital signal processing (DSP) library for C++.
- Otter,[51] a 2D C# framework built on SFML 2.
- GDevelop,[52] open source game creation software.
- Immersion Engine,[53] tool to visualize detailed landscapes and architecture.
- is::Engine,[54] 2D C++ game engine for Android and PC.
See also
References
Further reading
External links
Wikiwand - on
Seamless Wikipedia browsing. On steroids.