Skip to content

SFML official examples ​

JavaScript ports of 24 SFML examples, covering graphics, native windows, input, audio and networking. Android is not ported yet. · Feature examples · Games and applications

All examples · Build requirements

Quick start ​

From the repository root:

sh
npm ci
cd examples/official
node tennis/Tennis.cjs

All commands below run from examples/official. Each script loads its own resources. Graphical examples need a display and OpenGL window support.

Browse: Graphics · Input and events · Audio · Networking · Platform integration

Graphics ​

Input and events ​

Audio ​

Recording examples need a microphone and recording permission.

Networking ​

For sockets and VoIP, run the entry point in two terminals: select server in one and client in the other. Use 127.0.0.1 for a local exchange.

Platform integration ​

Building nodegl requires CMake, a C++ compiler and OpenGL development libraries (libgl1-mesa-dev on Linux). Vulkan also needs a Vulkan loader and a driver supporting 4× anisotropic filtering.

Sources and licenses ​

Based on the SFML examples. Source revisions and asset provenance are recorded in provenance.json.

Icons made by Lorc, Delapouite & Skoll game-icons.net · CC BY 3.0