The workshop · authors

Write your own world onto the slate.

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.


01

The console

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.

editor · game.cpp
// 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);
}
preview · 480×270LOCKE
recipes
  • Fill the screen
  • Move a square
  • Bounce off the walls
  • Draw a sprite
  • Keep a score
  • Play a sound

a taste of the preview monitor. click it to open the real editor.

▸ Open the full console

02

The learning ladder

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.

Rung 01First light
Fill the screen, light a single pixel, draw a rectangle. The first minute ends with you making the screen do something.
Rung 02Move
Read a controller, move your square, and use the frame time so it travels at a fair speed no matter how fast the console runs.
Rung 03Feel
Colour, gradients, sprites, and transparency. The difference between a box on screen and something that feels alive.
Rung 04Play
Collisions, a score, winning and losing, and a second player on the other pad.
Rung 05Sound
Fire an effect, loop a piece of music, and make things react to the beat.
Rung 06Worlds
Tilemaps, scrolling, a little physics, and a whole small game you can hand to someone.

03

Why it is taught this way

// SHOW

Show, do not tell

Every idea is a button that runs. You change a line and the screen changes with it. Nothing stays abstract for long.

// START

Never a blank page

You always begin from a cartridge that already works and change one thing. The fear of the empty file never gets a chance.

// OWN

You own what you make

What you export is a real file you keep and run on your own Locke. Not locked in an app, not a subscription. Yours.

The console is live. Open the editor, run a recipe, change a line, and watch it on the preview, then export a real 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.

04

Read it, or vibe-code it

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.

// READ

A real spec, not a black box

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.

// VIBE

Built for vibe coding

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.

// SHARE

One file to pass on

The primer is a single download. Keep it, read it, or give it to anyone, or any model, who wants to build for Locke.