toy is a small, open-source C++ game engine created by developer Hugo Amiard. Its idea was simple: instead of a giant editor-first engine, give programmers the thinnest possible stack for making 2D and 3D games directly in C++, with an immediate-mode user interface, a programmable renderer and scripting generated automatically from your own code. It went public on GitHub in August 2018, and one of its showpieces was an editor light enough to run in a web browser.
This profile covers what toy is, how it’s built on its companion library two (formerly mud), what it can do, and where the project stands in 2026, based on our own analysis of both repositories. Facts were checked against the toy and two source repositories, toy’s manual and its live demo pages in November 2026.
What Is the toy Game Engine?
toy is a free, open-source C++ game engine by Hugo Amiard, released under the GPL v3 licence. It’s built on his two library (formerly mud), which provides reflection, an immediate-mode UI and a bgfx-based renderer. toy adds entities, Bullet physics and Recast navigation, and compiles to the web with Emscripten. Its last commit was in April 2021, and the project is dormant.
toy engine at a glance
| Type | Thin, code-first 2D and 3D game engine |
|---|---|
| Author | Hugo Amiard |
| First public commit | August 1, 2018 |
| Last commit | April 25, 2021 |
| Status | Dormant; described by its README as not production ready |
| Written in | C++ |
| Built on | two (formerly mud) library, with bgfx rendering |
| Scripting | Lua, Wren and visual scripting, generated through reflection |
| Physics and AI | Bullet physics, Recast navigation meshes |
| Platforms | Windows, Linux and the web (Emscripten/WebAssembly) |
| Licence | GPL v3 (two: zlib) |
A Short History of toy
toy grew out of Amiard’s general-purpose C++ library mud, which he described as a toolkit for building lean graphical applications from small, reusable modules rather than “gigantic tightly coupled engines“. toy was the game layer on top of it.
The public toy repository starts on August 1, 2018. The first months were intense: 220 commits in 2018 and 218 in 2019, peaking at 143 in January 2019 alone. Every one of them is by Amiard himself. Activity then stopped: one commit in December 2019, none in 2020, and a final burst of 14 commits in April 2021, which updated the build scripts, switched web builds from asm.js to WebAssembly and renamed mud to two throughout the code (toy on GitHub). There have been no commits since.
toy’s README still describes it as “under heavy development, not yet stable, fully documented or production ready”, and its roadmap of planned features, from clustered rendering to networking, dates from 2018. Amiard funded the work through Patreon and said he hoped to move toy to a more permissive licence if it secured regular financial support.
How toy Works
toy is deliberately code-first. There’s no scene editor you must use; you write a game module in C++, and toy calls it every frame. Most of the machinery lives in the two library underneath:
- Reflection. You annotate your own C++ types, and a precompile step generates metadata for them. That metadata powers the automatic parts of toy: scripting bindings, editor inspection and serialisation, without hand-written glue.
- Immediate-mode UI. Every frame, your code declares the widgets it wants (windows, docks, tabs, sliders, node graphs, text editors), and the library handles layout and styling, including CSS-like style sheets.
- A programmable 3D renderer. two’s renderer runs on top of bgfx, a cross-platform rendering library, with physically based (PBR) materials, shadows, glTF and OBJ importers, and full control over shaders and render passes. The scene is also declared every frame, in the same immediate style as the UI.
- Scripting. Thanks to reflection, game code can be scripted in Lua or Wren, or with a node-based visual scripting language, all generated from the same metadata.
- Game systems. toy itself adds entities, Bullet physics and Recast navigation meshes, plus helpers for procedural generation.
- Web builds. With Emscripten, toy and its examples compile to WebAssembly, so the editor and demos run in a browser.
The project’s build system is GENie, which generates Makefiles or Visual Studio projects. toy expects a copy of two next to it, and two in turn expects Amiard’s own forks of bx, bimg and bgfx.
Hello, toy: A Scene Declared Every Frame
This is the start of the scripting example that ships with toy, as it stands in the repository’s final version. The pump() function runs every frame. It declares the UI (a board holding a 3D viewer with an orbit camera) and then the scene (a ground plane, a directional light and image-based lighting from an environment map):
void ex_15_script_pump(Shell& shell, Game& game)
{
Widget& uroot = shell.m_ui->begin();
Widget& umain = ui::board(uroot);
SceneViewer& viewer = ui::scene_viewer(umain);
ui::orbit_controller(viewer);
Gnode& groot = viewer.m_scene->begin();
Material& material = milky_white(viewer.m_gfx_system);
Gnode& ground_node = gfx::node(groot, {}, vec3{ 0.f, -5.f, 0.f });
gfx::shape(ground_node, Rect(vec2{ -50.f, -50.f }, vec2{ 100.f }), Symbol(Colour::None, Colour::White), 0U, &material);
gfx::directional_light_node(groot);
gfx::radiance(groot, "radiance/spherical_snow.jpg", BackgroundMode::None);
// ... a grid of cubes, spheres and cylinders, plus a Lua script editor
}
There’s no “create once, update later” step: the same declarations are made each frame, and two works out what changed. It’s the immediate-mode idea that Dear ImGui popularised for user interfaces, applied to the scene graph too. The rest of the example draws a 10×10 grid of shapes and opens a Lua editor that can change them while the game runs.
Our test: we cloned the toy and two repositories and analysed them directly, and that analysis is the source of the activity chart and code counts in this article. We didn’t build toy. Its final version expects a matching copy of two (then still called mud) beside it, and two’s history before November 2023 has since been replaced, so that version is no longer in the repository. The excerpt above is copied verbatim from toy’s final code. toy’s own manual shows a similar example, but written against an older version of the API.
toy and two in 2026
toy is dormant. Its repository hasn’t changed since April 25, 2021, and its build depends on a version of two that’s no longer in the two repository.
two has changed course. On November 10, 2023, the two repository’s history was replaced with a fresh start: 17 commits over ten days, rebuilt around C++20 modules, and released under the permissive zlib licence (two on GitHub). Its README now presents two as an app-prototyping library rather than a game engine, with its graphics and UI layers also published separately as twfx and twui. The older mud repository address now redirects to two. There have been no commits to two since November 2023 either.
The demos are still hosted. toy’s live demo, a lightmapped scene ported from Godot, is still published on GitHub Pages (toy’s live demo). When we opened it in Chrome in November 2026, the page loaded all its files but didn’t start rendering the scene, so treat it as a historical showcase rather than a working sample.
For a new project in 2026, toy isn’t a practical choice. Its value now is as a readable study of a code-first engine design.
Is toy Built on zlib?
No. zlib is a licence here, not a library. The two library is released under the zlib licence, a short permissive licence that’s popular for game libraries. toy itself is under the GPL v3, which means a game that ships with toy’s code must also be released under the GPL. These are licensing terms, not part of toy’s technology stack.
What’s Inside the Repositories
We counted the code in both repositories (November 2026):
| Repository | Licence | Own source code | Activity |
|---|---|---|---|
| toy | GPL v3 | About 25,000 lines of C++ (excluding generated reflection code) | 452 commits, August 2018 to April 2021 |
| two | zlib | About 65,000 lines of C++ (excluding generated code and third-party libraries) | 17 commits, November 2023 (history restarted) |
That small size was part of toy’s pitch: its README claimed the codebase was “about one-tenth the size of competing engines”. toy’s repository includes four example projects (a character, a UI demo, scripting and pathfinding), and its README links web builds of platform, RTS, editor and space demos.
toy Engine Alternatives
- Godot: a free, open-source engine with a C++ core, a full editor and a large community. See our Godot engine profile.
- Panda3D: an open-source engine with a C++ core, mostly used from Python. See our Panda3D engine profile.
- raylib: a small, actively maintained C library for writing games directly in code, close in spirit to toy (raylib).
- bgfx: if it’s toy’s renderer you’re after, the cross-platform rendering library it was built on is still developed (bgfx on GitHub).
For more open-source engines, see our directory of open-source C++ game engines.
Key Takeaways
- toy is a thin, code-first C++ game engine by Hugo Amiard, released under the GPL v3 in August 2018.
- It’s built on the two library (formerly mud), which provides reflection, an immediate-mode UI and a bgfx-based renderer.
- Reflection drives its tools: scripting in Lua, Wren or visual nodes, and editor inspection, are generated from your own C++ types.
- The project is dormant: toy’s last commit was in April 2021.
- two restarted in November 2023 as a zlib-licensed C++20 modules library, so today’s two no longer matches what toy was built against.
- For new projects, Godot, Panda3D or raylib are safer choices; toy is best read as a study in engine design.
Conclusion
toy set out to prove that a game engine could be small enough to understand, with tools generated from your own code rather than bolted on. In its busy 2018–2019 run it largely did that, and its in-browser editor still impresses on paper. But it remained a one-person project, and since 2021 it has stood still while its foundation, two, moved on to a different form. It’s worth reading for its ideas, not building on.
For more engines across every genre, browse our game development hub.




