New to programming or to C++? Get started is written for you: it
takes a Windows PC with nothing installed to a small game of your own that runs, with every command
to copy. Going further than that means learning C++.
Windows, and a desktop browser through WebGL2
C++20, built with CMake and vcpkg
Direct3D 11, Direct3D 12, OpenGL 3.3 and Vulkan renderers
MIT licence
Early: 0.x releases, no compatibility promised yet
A complete scripted match. 35 seconds, no sound. Download the MP4.Read a description of the video
Coloured pieces turn and slide into a falling-block well. Completed rows disappear, throwing matching sparks sideways as the score and line count rise. The hold slot keeps one piece in reserve, and the next five pieces appear beside the board. Later the stack reaches the top: a “TOPPED OUT” banner appears and thousands of coloured particles burst across the screen, then fade. The game has no sound or spoken commentary.
A match in progress.Four lines cleared, eight frames later: about nine hundred sparks from a field of up to ten thousand.
Watch the pieces lock, the rows clear and the sparks fade. The stills below the video are exact
frames read back from the graphics device; the video is compressed for playback.
The Examples page says how the game is built.
Play LineSweeper in a desktop browser.
The hosted demo downloads the game only when you click, and plays with a keyboard. Phones are a
planned phase, so a phone gets a poster and a recording of the game to tap and watch, not the
game itself, until real iPhone checks and the host page’s phone layout pass. Android remains
unverified.
Labrador is a small engine with firm opinions. Each one below helps some games and gets in the
way of others, so each comes with its price.
Ordinary C++ and standard tools
A game is a C++ program that links two static libraries. Its build file is plain CMake that
names the sources, links the engine and puts the content beside the program, which is what
building and running it needs, and its install rules stage the folder a player gets. There is no project
format, no code generator and no macro dialect between your source and the compiler.
The cost: all behaviour is C++, and every change to it is a compile. There is no visual editor, no scripting language and no hot reload.
The engine meets a game at a few small interfaces, and what stands behind them is the
game’s choice: one class per entity, or one object holding ten thousand particles in a flat
array.
The cost: storage and ownership are your decisions. The engine does not manage objects for you, and those interfaces are virtual calls.
A scene can be drawn through several cameras into several viewports in one frame, which is
what split-screen is. Gamepads come with deadzones, press edges and menu navigation.
The cost: online play and 3D are out of scope for good.
The falling-block sample keeps its whole game in a library that links nothing from the
engine, so its tests play complete matches with no window and compare them byte for byte.
The cost: that separation is a design you choose and keep. The engine makes it possible; it does not make it automatic.
These lines are the heart of main.cpp in the minimal sample, the project you copy to
start a game. They start the engine, load the content and hand it a first state. Above them the
file names the window; below them it reports a failed start. Everything it leaves out belongs to
the engine.