From scratch.
All the way down.
A game engine with no engine underneath it.
Its own Wayland and X11 backends over hand-written FFI — no winit, no SDL. Its own Wayland protocol code generator. A render graph that is the only thing in a frame allowed to emit a barrier. A Vulkan backend and a WebGPU backend implementing one seam, checked against each other pixel by pixel. The browser demos run the same engine as the native build, compiled to wasm32.
why
Because “from scratch” is where the learning is. Every layer a normal engine hands you — the window, the swapchain, the input stack, the replication protocol, the mixer — is a layer whose failure modes you never see. Writing them means meeting those failure modes personally.
That principle has a cost and the repo pays it in public. The windowing
crate talks to libwayland-client and libxcb
through FFI written by hand and bound at runtime with
dlopen, driven by a Wayland protocol scanner also written for
this project. Nothing above the hardware abstraction layer is allowed to
name a Vulkan type. Every unsafe block carries a comment naming
the invariant it depends on.
The other half of the principle is that a check which cannot fail is not a check. Tests here are broken on purpose to confirm they go red before they are trusted — the browser gate, the cross-backend image comparison and the shader manifest were each built that way, and each caught something real the first time it ran.
what exists
The engine is built in phases, each ending in a sample that proves the phase. Breakout is the first one, and it runs natively and in a browser from the same source.
-
Windowing — Wayland and X11 backends over hand-written
dlopen'd FFI. Monitors, XKB keymaps, pointer lock and raw motion, fractional scale, clipboard, drag and drop. - Rendering — a Vulkan backend and a WebGPU backend behind one seam, plus a render graph whose compile step is pure and testable with no GPU at all.
- Simulation — an ECS with system-owned arrays, an authoritative fixed-tick server, client interpolation, and a physics pillar with swept-sphere collision. Same input, same hash, every run.
- Netcode — delta compression against acknowledged baselines, session resume, and an authenticated wire protocol. Hostile input is assumed, and the decoders are fuzzed in CI.
- Audio — a mixer with a spatial cue grammar, WAV and QOA decoding, and an AudioWorklet output for the browser.
- The browser — every sample ships as a demo. A headless Chromium gate loads the built page, opens a WebGPU device, drives a real keypress and reads the canvas back, so the web target cannot rot unnoticed.
Still to come: GPU-driven rendering, an editor, assets and scenes, and the samples that force each of them. The roadmap is the honest version — it records what is missing and what is broken alongside what works.