Hapaxia edited this page Apr 28, 2018 · 84 revisions

Source Codes

Welcome to the section dedicated to external source codes for SFML.

Game Engines


  • [C++] AnimatedSprite: A class that provides an easy interface to Animations and follow the design of sf::Sprite (by Foaly)
  • [C#] CurvedText class: Draws circularly arranged text and implements most of SFML.Graphics.Text's interface.
  • [C++] Higher Performance Sprite Container: Both a faster way to use many sprites with the same texture and a shortcut container to make life easier. (by masskiller)
  • [C++] Drawable Line Shape: A drawable-derived fast-rendering class for shapes made of lines
  • [C++] Drawing Color Gradient: Draw and manage color gradient easily with this class
  • [C++] Draw Rounded Rectangle: A class that renders rounded rectangles
  • [C++] Line segment with thickness: Two simple classes for drawing a line segment with thickness.
  • [C#] Line with Thickness: Lines or LinesStrip VertexArrays always draw 1 pixel lines. This is a method to generate a TrianglesStrip representing a line along a set of points (e.g a Polygon).
  • [C++] Round Ended Lines: A class that renders round ended Lines (by Foaly)
  • [C++] Tile Map with VertexArrays: Load, cull, texture and display quads as tiles
  • [C#/C++] TileMap renderer: efficient tilemap drawing
  • [C++] Shader Tile Map: tile map drawing using one texture as data and other as graphics and swapping data pixels for graphic pixels using glsl fragment shader
  • [C++11] Vertex Vector: drawable alternative to VertexArray that supports emplacement and foreach loops
  • [C++] Simple bouncing ball example: Simple example showing how you can bounce a ball around a window.
  • [C++] Sprite3d: A class similar to SFML's standard sprite that also includes ability to rotate around all three axes (by Hapax)




  • [C++] RichText: Class to handle rich text. (by Panithadrum)
  • [C++] Fader: Class to facilitate fading. (by cire)
  • [C#] GTK Integration: Using a Gtk# socket to render SFML inside GTK.


  • [C++] Smart Resource Manager: Generic resource manager which keeps track of it's references. (by Groogy)
  • [C++] sftools::Chronometer: This class provides the basic mechanism of a chronometer.
  • [C++] FPS: A class that simplifies frame rate calculation.
  • [C++] FrameClock: A class to track various frame time statistics.
  • [C++] wxScrolledSFMLWindow (by TricksterGuy) : Integrates an SFML window onto a scrolled wxWindow
  • [C++] PhysFS: A class that adapts PhysFS to SFML with a custom sf::InputStream
  • [C++] LoadImageFromResource: An example of how to load data from a resource (.rc) into sf::Image.
  • [C++] Loading Images in a Thread: An example of how to load images in a background thread. (with boost)
  • [C++] Verlet physic: A simple example of physic circle body in space.
  • [C++] Settings Parser: Simple class for reading and writing settings in text file. (by cristaloleg & Foaly)
  • [C++] HSL Color: A class for working with HSL and converting to and from RGB. (by masskiller)
  • [C++] Simple and elegant File Logger (by mateandmetal)
  • [C++] Loading resources using PhysFS
  • [C++] Calculating points of a Cubic Bézier Curve Allows drawing of a smooth curve approximation based on four points.
  • [C++] KeyValues Simple parser class
  • [C++] 2D Vector Manipulation A more advanced class for manipulating and transforming 2D vectors.
  • [C++] Analog Clock A simple program to draw a basic 2d analog clock.
  • [C++] Letterbox effect: A small example to archieve a letterbox effect when resizing the window, having black bars appear either horizontally or vertically to keep the view's aspect ratio.
  • [C++] Zoom View At Free function that zooms a view at a specified pixel rather the centre of the window/view.
  • [C++11] Rectangular Boundary Collision Templated free function that tests collision of any two objects using their local boundary box; this is not simply AABB collision. (by Hapax)
  • [C++] Rotate View At Free function that rotates a view at any specified co-ordinate rather the centre of the view/window.


  • [C++] MP3 Player: Class inspired sf:: Music for playing mp3 file using the library mpg123
  • [C++] Audio Player: Class inspired sf:: Music for playing audio file using the library ffmpeg
  • [C++] Simple Jukebox: A simple class to create, modify and play playlists from audio files in a given directory.
  • [C++] Looping Music: A class that enables music to loop between 2 specific time points
  • [C++] Mp3 Soundfile Reader: A class that allows the read of mp3 file using the mpg123 library
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.