Simple and Fast Multimedia Library

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, and Rust.[3] Experimental mobile ports were made available for Android and iOS with the release of SFML 2.2.[4]

Original author(s)Laurent Gomila, and others
Developer(s)SFML Team
Initial releaseAugust 9, 2007; 16 years ago (2007-08-09)
Stable release
2.6.1 / November 4, 2023; 5 months ago (2023-11-04)
Repository
Written inC++
Operating systemLinux, macOS, Windows, FreeBSD
TypeAPI
Licensezlib License[1][2]
Websitewww.sfml-dev.org

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 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.[5][6] The first version v1.0 was released on 9 August 2007, and the latest version v2.6.1 was released on 4 November 2023.[7]

Software architecture

Modules

SFML consists of various modules:

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 2017.

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),[8][9] 2D lighting,[10] particle systems and animation,[11] video playback[12] and tilemaps.[13]

Reception and adoption

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 been adopted by many Ludum Dare participants also.[14] Compared to older libraries such as Simple DirectMedia Layer (SDL) and Allegro, the SFML user base is relatively small but growing. As of 20 June 2023, its GitHub software repository has been starred by 8,774 users.[15]

SFML has been used in teaching at universities and in scientific projects.[16][17][18][19][20][21]

Video game use examples

Further examples of games using SFML are listed on IndieDB.[47]

Other software use

See also

References

Further reading

External links