Forge is a console in your browser. You copy a piece of code, change a line, and watch it run on a live preview, then export a finished cartridge to a Locke. It is the easiest place to start, and the heart of how all of this is taught. Constraint is the canvas.
Three panes. On the left you write. In the middle it runs. On the right is a library of small recipes you can drop in and change. When it looks right, you export a real cartridge and load it onto a Locke over USB.
// a square you can move #include "locke_game.h" static float x = 240, y = 135; static void update(LockeGameCtx *c) { float s = 120 * c->dt; if (c->pad[0] & LK_PAD_LEFT) x -= s; if (c->pad[0] & LK_PAD_RIGHT) x += s; // paint the night sky fill(c, 0xFF10202E); // draw the square rect(c, x-12, y-12, 24, 24, 0xFFFFAA22); }
a taste of the preview monitor. click it to open the real editor.
Each rung is a handful of small recipes you can run and change. By the top of the ladder you have built a whole game, one idea at a time.
Every idea is a button that runs. You change a line and the screen changes with it. Nothing stays abstract for long.
You always begin from a cartridge that already works and change one thing. The fear of the empty file never gets a chance.
What you export is a real file you keep and run on your own Locke. Not locked in an app, not a subscription. Yours.
game.cpp cartridge. Pair it with
the console it builds for and the
game API in the Codex. More recipes, sound, and an
Atlas target are on the way. This is the part we can't wait to see.
The Locke primer is one page: the screen, the controls, the handful of functions, and the rules for code that both runs in the Forge and compiles to a cartridge. Read it to learn the system and write your own, or hand it to a coding model and vibe-code a game with it. Either way the rules are the same.
One page in plain language: 480 by 270, two pads, the draw and sound calls, and what compiles. Enough to write a whole game by hand if you want to.
Hand the primer to a coding model. It asks what game you want, writes it for Locke and its controls, and you paste it straight into the console.
The primer is a single download. Keep it, read it, or give it to anyone, or any model, who wants to build for Locke.