One person and Claude

How it was made

The engine, the games and this site, made by talking with Claude Code and measured on the real board.

In numbers

  • 24.320lines of C in the engine
  • 17example games
  • 295tests on every change
  • 662commits in the repository

One person and Claude. The engine, examples, tools and this site were written in conversation with Claude Code: every idea was tried in the simulator, measured on the board and corrected based on what the board showed.

The art, generated and made to fit. The looks that call for it (Neo Geo, CPS2, 32-bit) use AI-generated images. The engine's tools cut them out, scale them to the right height, split them into frames and reduce them to the console's palette. The low-res looks are drawn with code.

Measured before calling it done. Every example has a script that plays it automatically. On the computer, it checks each frame's checksum against the stored one; on the board, it logs the fps every second. Optimisations don't change a single pixel.

A quality gate. Every demo passes a list: a card with its look, five achievements, text in three languages, a “how it works” menu, a cover, a test script and its numbers measured on the board. The script runs in Spanish, Catalan and English, and the simulator fails if a text is cut by the edge or does not fit its box. Bots play every demo to the end, which is how levels that could not be won were found.

Truly free. The code is MIT; the examples' art, sound and videos are CC0. Take it, change it, build your own console.

One enemy, from request to game

The goblin from mazmorra, step by step, with the actual images.

  1. 1 · The request

    An original goblin enemy for a fantasy beat-em-up: small, wiry and hunched, green skin, huge pointed ears, a ragged brown loincloth, a rusty curved dagger. Full body, facing left. Style: a mid-1990s arcade sprite, crisp hard pixel edges, a bold dark outline, about 15 colours. Transparent background.

    Shortened from the original English request.

  2. 2 · The reference

    The goblin alone, full body: green, with pointed ears and a curved dagger

    The character alone. It's attached to every later request, so it doesn't change from one image to the next.

  3. 3 · The sprite sheet

    Ten poses of the goblin in two rows, on a blurred dark background

    Ten poses: walking, stabbing, taking a hit and falling. A transparent background was requested; it came out painted.

  4. 4 · Cut out

    The ten frames cut out, at the same scale and with their feet on the same line

    The engine's tools remove the background, split the frames, bring them to the same scale with their feet on the same line, and reduce them to 15 colours. Then each one is checked by eye.

  5. 5 · In the game

    Alba the swordswoman facing two goblins in a dungeon corridor

    In mazmorra they come in groups, at 60 fps on the console.

Fourteen days in the repository

  1. The engine grows out of two adventure games and is measured on the board: the image goes straight to the panel, in strips.

  2. A virtual picture processing unit, like the Game Boy Advance's, and Lua games of any genre.

  3. Measured on the console and optimised. The web editor, for making games without coding.

  4. The looks of twelve consoles, first person, instructions for agents to make games, the site and the Library.

  5. The site and editor in three languages; Codex's games and IL·LUSTRES join the Library.

  6. The sound studio, a sequencer with a synth and effects. The site in tabs, with the Play tab and a page and a ranking for each game.

  7. Comments and votes on every game, and PlayStation-style 3D measured on the board: lights, warps, perspective and clipping.

  8. Textured 3D faces and cameras, cut-out animation, glowing particles and a transitions library.

  9. Instruments, sends and echo for sound, Game Boy Advance-faithful blending and a pinball with real physics.

  10. Stylus and several fingers on the touch screen, two screens in the simulator, the POWERED BY PINYOL splash in every game, Lua at twice the speed, eleven new examples and firmware 0.3.0.

  11. The console's menu over any game, with settings, favourites and achievements; games between consoles over the radio; Celeste-style movement; and code running from PSRAM, which speeds up the world by up to 30%.

  12. XM and S3M modules, FamiStudio songs, rollback between consoles, field of view on grids, the console's memory reorganised and firmware 0.4.0.

  13. mesh(): 3D models drawn in C, and four games with the 32-bit look: Selva, Niebla, Recortes and Cajas. Firmware 0.5.0.

  14. Twelve polished demos measured on the board: Taller de los Autómatas (CPS2) and Cromota, a touch puzzle; their own logos, menus and typefaces; text that always fits; pictures that draw up to three times faster on the console; and a new-version notice in the desktop app. Firmware 0.7.0 and 0.7.1, with leaving to the list fixed.

The whole process is in the repository: how the art is made (opens in a new tab), the Lua API (opens in a new tab), the instructions for agents (opens in a new tab).

ESP32-S3R8 · 240 MHz · octal PSRAM at 80 MHz · QSPI screen at 80 MHz

Measured on the console, not promised

Every figure in this section comes from the board: firmware that plays each game from a script and logs a performance line every second, or a benchmark that runs each scene five times. No emulator. At 60 fps, each frame has a 16.6 ms budget.

  • 71%of one core in the heaviest scene: affine, four layers and 128 sprites
  • 8,1msto send a whole frame to the panel; the wire alone takes 7.7
  • 3%of one core for the sound of a simple game; with layered music, up to 18%
  • 295self-playing tests that check every frame, run on every change

Twelve looks, in frames per second

The slowest and fastest second of each example, played on the console. In grey: the first measurement, before optimisation.

Lookfps
Neo Geopaella 36–59 fps
CPS2taller 33–60 fps
Game Boycerezo 53–60 fps
ZX Spectrumsocavon 58–60 fps
PICO-8tumba 56–60 fps
LCD handheldmalabar 58–60 fps
PlayStation · Saturn 2Dfaro 30–57 fps
Super Nintendo · Mega Driveponcho 36–59 fps
Vectorpozo 54–60 fps
Game Boy Advancebotin 49–60 fps
Vertical arcadetraca 47–60 fps
First personceller 42–58 fps

Second by second

Each point is one second of play on the board, from the performance line logged every second while a script plays the game. Dashed: the first measurement; solid: today's. The first second loads the scene and doesn't count in the figures.

  • gotico 32-bit · the hall

    3060

    32,016,7 ms per frame

  • laberinto first person · walking

    3060

    40,916,7 ms per frame

  • ladrillos PICO-8 · playing

    3060

    18,817,6 ms per frame

  • tormenta vertical · waves

    3060

    48,732,3 ms per frame

These needed no optimising:

  • cerezo Game Boy 53–60
  • socavon ZX Spectrum 58–60
  • tumba PICO-8 56–60
  • malabar LCD 58–60
  • pozo vector 54–60
  • veloz 16-bit 56–60

How a frame reaches the screen

There is never a whole frame in memory: the screen is drawn in 15 strips of 32 columns. The two cores split each strip, left half and right half, in internal RAM, while DMA sends the previous strip to the panel.

In slow motion: a real frame takes 16.6 ms; here, 2.4 seconds. Sending a whole frame takes 8.1 ms, 7.7 of which is the wire itself.

Finding what's expensive

The same scene, replayed with one thing removed each time. In gotico, blending the two moonbeams on the fly ate 13 ms a frame: now they come pre-painted into the background, and the game went from 31 to 60 fps.

gotico, before the fix (ms per frame)

Measurement
16.6 ms = 60 fps
everything32.0 ms
no columns30.5 ms
no moonbeams19.0 ms
no moonbeams or glows16.3 ms
nothing on top16.2 ms

laberinto: the raycast before and after optimising it (ms per frame)

Measurement
16.6 ms
everything · before39.0 ms
everything · now24.4 ms
raycast only · before34.6 ms
raycast only · now22.1 ms
image only · before19.0 ms
image only · now16.3 ms

What drawing costs, on one core

A 240×160 logical frame of synthetic content, best of five runs, as a share of one core's time at 60 fps. The console has two cores.

Measurement
one whole core
One tile layer1.96 ms · 11.8 %
128 sprites, 16×162.24 ms · 13.5 %
One full-screen affine layer3.34 ms · 20.0 %
Alpha blend of two whole frames4.03 ms · 24.2 %
Mode 7: one affine layer, 64 sprites6.28 ms · 37.7 %
4 tile layers6.50 ms · 39.0 %
GBA mode 0: 4 layers, 128 sprites8.64 ms · 51.9 %
Everything: affine layer, 4 layers, 128 sprites11.88 ms · 71.3 %

And why nearly everything is drawn in internal RAM: the speed of copying 1 MB.

internal RAM → internal RAM381.0 MB/s
PSRAM → internal RAM84.7 MB/s
internal RAM → PSRAM48.5 MB/s
PSRAM → PSRAM31.9 MB/s

Source: docs/measurements.md (opens in a new tab), with the method and every measurement since day one. Measure it on your own board: idf.py -DBP_BENCH=ON build flash monitor