Original author(s) | Laurent Gomila, and others |
---|---|
Developer(s) | SFML Team |
Initial release | August 9, 2007 |
Stable release | 2.6.1 / November 4, 2023 |
Repository | |
Written in | C++ |
Operating system | Linux, macOS, Windows, FreeBSD |
Type | API |
License | zlib License [1] [2] |
Website | www |
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]
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]
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.
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 |
CSFML 1 | C | 2.6 |
SFML.Net 1 | .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 |
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.3 |
OCaml-SFML | OCaml | 2.5 |
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.5.1 |
zig-sfml | Zig | 2.6.1 |
1 Official bindings
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]
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. [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 [update] , 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]
Further examples of games using SFML are listed on IndieDB. [48]
Blitz BASIC is the programming language dialect of the first Blitz compilers, devised by New Zealand–based developer Mark Sibly. Being derived from BASIC, Blitz syntax was designed to be easy to pick up for beginners first learning to program. The languages are game-programming oriented, but are often found general-purpose enough to be used for most types of application. The Blitz language evolved as new products were released, with recent incarnations offering support for more advanced programming techniques such as object-orientation and multithreading. This led to the languages losing their BASIC moniker in later years.
OpenGL is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardware-accelerated rendering.
Simple DirectMedia Layer (SDL) is a cross-platform software development library designed to provide a hardware abstraction layer for computer multimedia hardware components. Software developers can use it to write high-performance computer games and other multimedia applications that can run on many operating systems such as Android, iOS, Linux, macOS, and Windows.
Allegro is a software library for video game development. The functionality of the library includes support for basic 2D graphics, image manipulation, text output, audio output, MIDI music, input and timers, as well as additional routines for fixed-point and floating-point matrix arithmetic, Unicode strings, file system access, file manipulation, data files, and 3D graphics. The library is written in the C programming language and designed to be used with C, C++, or Objective-C, with bindings available for Python, Lua, Scheme, D, Go, and other languages. Allegro comes with extensive documentation and many examples.
Irrlicht is an open-source game engine written in C++. It is cross-platform, officially running on Windows, macOS, Linux and Windows CE and due to its open nature ports to other systems are available, including FreeBSD, Xbox, PlayStation Portable, Symbian, iPhone, AmigaOS 4, Sailfish OS via a Qt/QML wrapper, and Google Native Client.
Game programming, a subset of game development, is the software development of video games. Game programming requires substantial skill in software engineering and computer programming in a given language, as well as specialization in one or more of the following areas: simulation, computer graphics, artificial intelligence, physics, audio programming, and input. For multiplayer games, knowledge of network programming is required. In some genres, e.g. fighting games, advanced network programming is often demanded, as the netcode and its properties are considered by players and critics to be some of the most important metrics of the game's quality. For massively multiplayer online games (MMOGs), even further knowledge of database programming and advanced networking programming are required. Though often engaged in by professional game programmers, there is a thriving scene of independent developers who lack a relationship with a publishing company.
SuperTux is a free and open-source 2D side scrolling platform video game inspired by Nintendo's Super Mario Bros. series. The player character is Tux, the official mascot of the Linux kernel.
Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python programming language.
Stratagus is a free and open-source cross-platform game engine used to build real-time strategy video games. Licensed under the GNU GPL-2.0-only, it is written mostly in C++ with the configuration language being Lua.
A free and open-source graphics device driver is a software stack which controls computer-graphics hardware and supports graphics-rendering application programming interfaces (APIs) and is released under a free and open-source software license. Graphics device drivers are written for specific hardware to work within a specific operating system kernel and to support a range of APIs used by applications to access the graphics hardware. They may also control output to the display if the display driver is part of the graphics hardware. Most free and open-source graphics device drivers are developed by the Mesa project. The driver is made up of a compiler, a rendering API, and software which manages access to the graphics hardware.
An open-source video game, or simply an open-source game, is a video game whose source code is open-source. They are often freely distributable and sometimes cross-platform compatible.
SuperTuxKart (STK) is a free and open-source kart racing game, distributed under the terms of the GNU General Public License, version 3. It features mascots of various open-source projects. SuperTuxKart is cross-platform, running on Linux, macOS, Windows, iOS (beta), Android systems and Nintendo Switch (homebrew).
MonoGame is a free and open source C# framework used by game developers to make games for multiple platforms and other systems. It is also used to make Windows and Windows Phone games run on other systems. It supports iOS, iPadOS, Android, macOS, Linux, PlayStation 4, PlayStation 5, PlayStation Vita, Xbox One, Xbox Series X/S and Nintendo Switch. It implements the Microsoft XNA 4 application programming interface (API). It has been used for several games, including Bastion, Celeste,Fez and Stardew Valley.
Godot is a cross-platform, free and open-source game engine released under the permissive MIT license. It was initially developed in Buenos Aires by Argentine software developers Juan Linietsky and Ariel Manzur for several companies in Latin America prior to its public release in 2014. The development environment runs on many platforms, and can export to several more. It is designed to create both 2D and 3D games targeting PC, mobile, and web platforms and can also be used to develop non-game software, including editors.
Orx is an open-source, portable, lightweight, plug-in-based, data-driven and easy to use 2D-oriented game engine written in C.
LÖVE is a free, open-source, cross-platform framework released under the zlib license for developing video games. The framework is written in C++ and uses Lua as its scripting language and is still maintained by its original developers. The framework is cross-platform supporting the platforms Microsoft Windows, macOS, Linux, Android, and iOS.
Raylib is a cross-platform open-source software development library. The library was made to create graphical applications and games.
GDevelop is a 2D and 3D cross-platform, free and open-source game engine, which mainly focuses on creating PC and mobile games, as well as HTML5 games playable in the browser. Created by Florian Rival, a software engineer at Google, GDevelop is mainly aimed at non-programmers and game developers of all skillsets, employing event based visual programming similar to engines like Construct, Stencyl, and Tynker.