Examples
Try a complete game or application, then explore the individual SFML features behind it.
Start here

Süper Mario Kart
A TypeScript kart racer with Mode 7 rendering, eight drivers and five circuits. Play Grand Prix or a single race against seven AI opponents.
Gameplay and run instructions
play-nes
A desktop NES emulator with native graphics and audio. Start with the bundled Concentration Room or load a local ROM you have permission to use.
Gameplay and run instructions
Breakout
The brick-breaker included in this repository: collisions, three lives, scoring and pause/resume. Read the complete game in a single JavaScript file, examples/breakout.cjs.
Browse by topic
- Feature examples
15 focused examples for System, Window, Graphics, Audio and Network.
- Official examples
24 SFML ports with platform requirements and upstream credits.
- ImGui examples
Native controls and a scene inspector with editable SFML graphics.
- RmlUi examples
RML/RCSS interfaces with a working counter, themes and upstream tutorials.
- Games and applications
Games in TypeScript, JavaScript and ClojureScript, with screenshots, controls and source links.
Before running
At the monorepo root, run
node tools/bootstrap.cjsonce, thencd packages/sfml.js. Run the commands below from that package directory. Usenpm run buildthere after source changes. Graphics examples require a display and OpenGL; separate projects follow their own setup instructions.
node examples/breakout.cjs
node examples/official/shader/Shader.cjs
node examples/network.cjs