Skip to content

The tools

What we build the box and its games with. Written by us, kept small, and on GitHub.

We are a small studio, so we make the tools we need and keep them small: one file where it can be, Python's standard library or Node and a browser, and nothing to buy. They live in the Sofa repository next to what they build, under the same licence. Each one below says what it does, what it needs, and what backs it.

Source-available · PolyForm Noncommercial 1.0.0 Every tool's code is on GitHub

tools@sofa

Tools
13
Built with
Python, Node, a browser
To buy
Nothing
Code
Every tool on GitHub
Licence
PolyForm Noncommercial

For games

Engines, and the bench they are measured on.

Every game on the box is one web page built on these. The bench and the checks say how each game runs before it reaches a TV, and again on the TV itself.

Game engine

Low3D

deploy/sofa-box/games/low3d.js

The box's game engine. It draws 3D on WebGL 1, with a flatter 2D fallback, or draws worlds on a grid with the processor alone. At its first start it looks at the box and picks a quality rung, and while a game plays a governor keeps the frame rate steady.

<script src="../pad.js"></script>
<script src="../low3d.js"></script>

New for WYRD, 1.1.83 to 1.1.86

Rig
bodies on a skeleton of 15 joints, each pose baked into one mesh: one draw call a body
Stream · Mesh.stamp
a world too big to hold, built a chunk at a time as the eye comes near and given back as it leaves; a thing built once, copied wherever it stands
Slots
what is carried and what is worn, worked like any menu
Emblem
one flat mark for a body's cloth, the HUD and a menu, sharp at any size
Confetti · Banners
a moment worth marking, inside the one draw call for what is written on the picture
GL.bloom · GL.hold
light that spreads from lamps and fires alone, on the upper rungs; a Pi 3's rungs never pay for it

JavaScript in one file · a browser, nothing elseSofa Box OS 1.1.28, 2026-11-07

What backs it The tests play every game on it in headless Chromium, and walk 400 m across a streamed world: never more than 36 chunks held, the ground always there.

2D engine

Low2D

deploy/sofa-box/games/low2d.js

Games in pixels, on top of Low3D: a 480×270 picture drawn crisp on any TV, the rules sixty steps a second, three looks at two paces and never below 30, and the same menus, options and saves in every game.

<script src="../pad.js"></script>
<script src="../low3d.js"></script>
<script src="../low2d.js"></script>

JavaScript in one file · on top of Low3DSofa Box OS 1.1.43, 2026-11-09

What backs it The tests play every game on it in headless Chromium.

Controller layer

SofaPad

deploy/sofa-box/games/pad.js

What every game on the box reads its controllers through: buttons by their place, so A and ✕ are the same button, both sticks, the triggers, rumble, and a player for every controller, numbered as it connects.

SofaPad.on((button, how, player) => { … })

JavaScript in one file · the browser's Gamepad APISofa Box OS 1.1.16, 2026-11-03

What backs it Every one of the box's own games reads its controllers through it.

Frame times, as a stand-in Pi 3

Games bench

tools/games-bench.mjs

Times every scene of every game the same way. It serves the games, starts a Chrome of its own at the box's screen size with WebGL 1 only, makes each game's own work twenty times as long, about what a Raspberry Pi 3 does to it, and counts frames a second, late frames, the work a frame, draw calls, triangles, pixels filled and garbage made. Point it at two checkouts and the numbers say what a change did.

node tools/games-bench.mjs --box pi3 --games tidewing --secs 15

Node and Chrome, nothing elseSince 2026-11-11

What backs it The frame table in the engine guide comes from it: Cinder Knight, 60 frames a second and none of 602 late. It says what it can't be, a Pi: the GPU is the computer's own, so every number it prints is that computer's.

glTF to Low3D, no Blender

Model packer

tools/low3d-models.py

Brings models made elsewhere, in glTF and flat colours, into a Low3D page as data: each model's colours, the box it fits in, and its vertices and triangles packed as bytes. When a model has more triangles than a Pi 3 should draw, its own mesh simplifier makes fewer: it collapses the edges that change the shape least (Garland and Heckbert's quadric error) and holds the edges between colours and the open edges, so the model keeps its look.

python3 tools/low3d-models.py ART_DIR LIST.json OUT.js

Python's standard library, nothing elseWith WYRD, Sofa Box OS 1.1.82

What backs it WYRD's props, weapons and creatures come into the game through it, and light, bake and join like meshes built in code.

The first page of our game maker

The maker: poses

deploy/sofa-box/games/maker/

Opens a game's own page, reads the parts the game marks for it, and draws the game's bodies exactly as the game bakes them. Turn a pose joint by joint, mirror it, revert it, play a clip at any rate, line up every body, switch to the picture a Pi 3 draws and watch the draw calls and triangles against a Pi 3's frame. What changes is copied out the way the game writes it; nothing is written back to the page yet.

python3 -m http.server -d deploy/sofa-box/games 8770
# then http://127.0.0.1:8770/maker/#wyrd

A browser and a mouse; a checkout, or the box's own browserSofa Box OS 1.1.83, 2026-11-12

What backs it Built on Rig, which WYRD's bodies moved into without a byte changing: 25 poses of 21 looks at two sizes, 1,050 meshes compared. The tests parse its page with every game's.

The measure on the box itself

Graphics check and games check

deploy/sofa-box/games/probe/

The graphics check names the box's GPU, runs the engine's two-second test, shows the rung a game would pick and draws a scene that way with its live frame rate. The games check plays every game in turn by itself and shows a table: frames a second, late frames, the slowest frame, the work a frame and memory.

http://127.0.0.1:8091/box/games/probe/#games&run

A page in the box's own browserOn every box since 1.1.28; the games check since 1.1.39

What backs it It is the real measure of a game on a Pi 3, and what it finds goes into the box's Send a report.

For the box

Cards, images and icons, checked before they reach a TV.

How Sofa Box OS is made, tried on a computer, proven in a virtual machine and read back, card by card.

The box on your computer

Box preview

tools/sofa-box-preview.py

See the Sofa Box on a Mac or a PC before it goes on a Raspberry Pi. It runs the box's own agent with a settings folder of its own, so nothing of yours changes, and opens the TV at the TV's size, a remote, Box settings and the boot screen with its themes. Videos play in mpv when it is installed; without it, a stand-in of ours answers mpv's controls in silence, so the TV and the phone remote still behave as they do on the box.

python3 tools/sofa-box-preview.py

Python 3; Pillow for the boot screen's picturesSince 2026-10-30

What backs it The stand-in for mpv is the same one the box's tests use.

Sofa Box OS, made the same way every time

Card builders

tools/build-sofa-box-image.sh

Makes a Sofa Box card from the Raspberry Pi OS pinned by date and SHA-256, and stops if the download isn't exactly that image. The box is set up on it, and a report lists every package on the card. Its twin makes the image for x86-64 PCs and virtual machines from plain Debian 13, one disk that starts under both UEFI and BIOS, and a third turns that image into a live DVD that runs from the disc and installs onto the PC's own drive.

sudo tools/build-sofa-box-image.sh out

A POSIX shell on Linux, as rootEvery card on the releases page

What backs it GitHub runs them whenever the box changes and puts each card on the releases page.

The PC image, started and checked

Boot proof

tools/boot-sofa-box-vm.sh

Boots a copy of the x86-64 image, or the DVD, in QEMU, under UEFI, under UEFI with Secure Boot and Microsoft's keys, or under BIOS, and checks from the inside: the box's helper answers, Sofa on the box answers, the TV's screen is up, and the phone remote answers from outside. With --install-onto it installs onto a blank drive the way Settings does on the TV, then starts the PC again from that drive alone. Each check is one line on the console; the image itself is never touched.

sudo tools/boot-sofa-box-vm.sh IMAGE.img out --firmware uefi-secure

A POSIX shell and QEMU, on LinuxOn every PC image and DVD GitHub builds

What backs it GitHub starts every PC image and DVD it builds this way, installs from both, and writes what each start said into the run's summary.

A card, read without starting it

Card inspector

tools/image-gen/inspect-card.py

Reads a card's image file without starting or mounting it: the partitions, the boot files (with a FAT reader of its own), every package, the services that start, the users, the kernels and the box's version, as JSON; or two cards side by side in Markdown. We made it to weigh a card from Raspberry Pi's rpi-image-gen against today's, and it reads any card laid out the Raspberry Pi OS way.

python3 tools/image-gen/inspect-card.py --compare today.json new.json

Python 3 and debugfsSince 2026-11-10

What backs it GitHub's image-gen run reads both cards with it and keeps the facts beside them.

Home's icons, drawn in code

Icon kit

tools/box-icons/

Home's icons in five styles, Glossy, Drawn, Sticker, Phosphor and Pixel, drawn as SVG in code, with a housing in each style for other companies' apps. It photographs each one in a headless Chrome and writes pictures at 192 and 512 pixels, so the gloss, glow and grain cost a Pi 3 nothing: the box only shows pictures.

python3 tools/box-icons/build.py glossy

Node and Chrome, run from PythonSofa Box OS 1.1.73, 2026-11-12

What backs it The tests check that the kit draws exactly the icons and styles Home asks for, and that its housings and Home agree on where a logo sits.

For your library

Videos a browser can play.

Any video, as an MP4

Video converter

tools/convert.py

Turns videos a browser can't play, MKV, AVI, WMV and the rest, into MP4s that play anywhere. H.264 or HEVC video and AAC sound are copied as they are, fast and with nothing lost; anything else is encoded again. Text subtitles are saved beside the MP4 as .vtt, the new file is checked against the original's length before the original is moved aside, and --remote converts files on another computer over SSH.

python3 tools/convert.py --remote media-server ~/Movies

Python 3, ffmpeg and ffprobeIn Sofa since 0.1.0, 2026-10-20

What backs it Sofa does the same in the background as files arrive, so this one is for a folder by hand.

How we make them

Small, ours, and next to what they build.

A tool earns its place by saving us time on every change. When a job seems to need a big program, we write the part we need instead: the model packer is about 300 lines of Python, where Blender would have been one more program everyone who builds a game has to install.

They are free to read, run and change for anything noncommercial, like the rest of Sofa. Found a bug in one, or made it better? Tell us on GitHub.

No big dependencies

Python's standard library, Node and a browser, and ffmpeg or QEMU where the job is video or a virtual machine. No Blender, no game-engine licence, no cloud service.

They say what they can't do

The games bench prints that it isn't a Pi. The boot proof works on a copy and never touches the image. The card builder stops when a download isn't the exact file it pinned.

Checked with the rest

The tests parse the bench and read its help, and hold the icon kit to what Home asks for. GitHub runs the card builders and the boot proof whenever the box changes.