In use: Life Detected's level 1, on two storeys, is one of its maps
Level Engine
Level editor on graph paper, run by each game's rules
Draw a level the way you'd sketch one on graph paper. The game's own rules say what every square and piece means, check every change you make, and place the lamps and props exactly where the game will.
Life Detected's levels used to be rows of characters in a text file. Now they're maps in this editor, which runs in the browser: fill squares to lay out the walls and floors, then place doors, locks, creatures, pickups, switches and signs on layers, each with its eye, lock and opacity as in Photoshop. Storeys stack, with stairs between them and openings onto the floor below, and rooms are painted with what they're for: a lab, a reception, a store. A map is plain JSON, and the game builds the level on top of it.
The editor itself knows no game. Everything a game means, from its kinds of square and its layers to its checks and where its lamps and furniture go, comes from a rules file kept in the game's own repository and read from the game's site, so the next game gets the same editor by writing its own rules. Life Detected's run 24 checks after every change, from doors filling gaps in walls and every room having a name to everything being reachable from the start, through locked doors once their keycard is reached and doors a switch opens, even from the floor above. A problem takes you straight to its square.
Lamps and props are never painted in. The rules place them: each lamp where it lights the most floor nothing else lights yet, desks in pairs, seats back to back with palms between them, a scanner arch out on a checkpoint's floor. Every choice comes from a hash of where it is, and Life Detected's build carries a copy of the same placing code, held to the same test cases, level 1 among them. So the 131 lamps and 80 props the editor shows on level 1's two storeys are the 131 and 80 the game builds.
Since 24 November Life Detected has been made in Unreal Engine 5.8, and its levels are still drawn here. Level 1 was drawn again on two storeys, on my phone, and the build in Unreal reads the map and the rules itself: it raises the walls, the hall two storeys high, the gallery and the stair, and stands every lamp and prop where the editor shows it. Further down this page, five of its rooms as the map has them and as Unreal builds them.
Try the level engine- Graph paper that scales Maps up to 1,024 squares a side, with a pencil, rectangles, lines and a fill, undo 200 steps deep, and the map kept in the browser between visits. Open a game's published levels straight from its site, or a file; save it as one.
- Layers, as in Photoshop Each kind of thing on a layer of its own, shown or hidden, locked or not, at any opacity. One piece a square on each, so a game can read every layer as a grid. Pieces that face a way turn with Q and E, Select drags one to a new square or the arrow keys nudge it, and a sign's lines are checked against what its kind needs.
- Checks after every change Counts, what stands on what, what has a wall behind it, doors that really fill a doorway, rooms walled in and named, a plate by each door off a corridor, and whether everything can be reached from the start. Each problem is listed with its square, and choosing one jumps there and selects the piece.
- Links, across storeys The Link tool joins a switch to the door it opens, or to the lift it resets, drawn as an arrow on the paper, dashed when it reaches another storey. The reach check follows them: a door a switch opens counts as open once the switch can be reached.
- Storeys and stairs Tabs for each storey, the one below drawn faintly under the one being drawn. Stairs lead up, squares can be open to the floor below or seen through as windows, and the reach check walks up and down every storey at once.
- Rooms that know what they're for The Fill tool paints a room up to its doors as one of the game's kinds of area, 27 in Life Detected, from receptions and staff rooms to labs and android quarters. A map names its look, the game's kit and textures, and the rules place by both.
- Lamps and props by rule Shown as layers of their own, worked out from what's drawn and never saved in the map. Lamps go where they light the most. Props stand against walls, hang on them or stand free, some over several squares, like a meeting table, and they keep clear of a stair's opening and its top step.
- Set pieces that change play Barricades a barrel breaks from within two squares, acid that can be waded at most three squares at a time, and webbing only fire clears.
- Works on a phone One finger draws, a second turns it into a pinch to zoom and pan, Erase is a toggle for fingers and pens, and the side panel tucks away on a small screen. Life Detected's level 1 was drawn on one.
Under the hood
Strict TypeScript and Vite with no framework: plain DOM over one canvas, the layout drawn as a picture a pixel a square, scaled up, repainting only the rows that changed. Rules files are read with Zod, and one written for a newer editor still reads. The only place a game is named in the code is a list of where each game publishes its rules and levels, which its host serves to any site that asks. Placing is pure and deterministic, every pick made by a hash of the square (FNV-1a with MurmurHash3's finish), so the engine writes test cases from Life Detected's level 1, an example map and maps made at random, and Life Detected's Python copy of the placing code, run inside the Unreal editor, must match them piece for piece. A 512 by 512 map checks in about 70 ms. 227 Vitest tests, Playwright runs on a computer and as a Pixel 7 with its fingers simulated through Chrome's DevTools protocol, and every green push deploys itself.