# Design This file fixes the parts that are easy to get wrong. The language and tools are up to you, as long as the numbers here hold. ## World A 16 by 16 grid, cell size 1. Walls are 1, open is 0, the map is `fixtures/qr-map.txt`. Spawn is (3.5, 3.5), heading 0 (east). Item `key-0` is at (10.5, 3.5). ## Walk `fixtures/qr-walk.json` is the authority for steps and for the end pose. The engine steps at 1/30 s. Forward speed 3 units/s, turn 120 degrees/s. ## Payload The packer layout (header, map, textures, code) is `docs` in the built project. Tests only require: size cap, round-trip, and that the walk works after a decode. ## Screenshot tolerance 8 levels, 98% of pixels. The QR image is compared after a decode-and-re-encode may differ; the check is that it decodes, plus a visual tolerance of 16 levels. ## Inputs | Key | Label | Default | Notes | | --- | --- | --- | --- | | `title` | Title on the boot screen | A small corridor | Shown for two seconds at boot. | | `scale` | QR module scale, px | 6 | From 4 to 10, for the written code image. | | `minimap` | Show a minimap | off | A tiny top-down map in the corner after boot. | | `dither` | Dither the frame | on | The world is drawn with a small dither, so it packs and still reads. | | `code` | Code kind | qr | qr writes a scannable code. raw-bytes is the same payload as a file, for tests that do not want a camera. | ## Acceptance at the defaults The numbers, names and fixture paths already in this file are the authority. Where a later table or a shipped fixture file disagrees with prose, the table or the fixture wins. | Fixture | Role | | --- | --- | | `design.md` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `fixtures/qr-map.txt` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `fixtures/qr-walk.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `spekkr.inputs.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | Golden frames are compared at 1400 by 1000 CSS pixels unless a requirement names another size. Tolerance, unless a tighter figure is given above: 8 levels, 98% of pixels, with motion, cursors and clocks frozen as this file says. A build's goldens are of that build; they do not have to match a shipped reference preview pixel-for-pixel if the tool or the type is different, but they do have to match this file's layout, counts and copy. ## Screenshots These pictures are headless-Chrome captures of the working reference in `reference/preview.html`, at the default inputs. They are not drawings of a product that has not been built. The first picture is the one Spekkr shows on the spec's card. A build may ship its own goldens; those goldens are of that build and do not have to match these frames pixel-for-pixel. | File | What it shows | | --- | --- | | `shots/corridor.png` | The small corridor, walls packed with scannable modules. | ## How to verify 1. Run the checks at the default inputs, without a network. 2. Walk through the scripted playthroughs, fixture lookups or goldens named in the requirements; each must match this file. 3. Repeat once at the person's inputs when they differ from the defaults. 4. The payload decodes (from a written QR or from raw bytes) and boots. A scripted walkthrough asserts a final position, heading, and an item pickup. A golden corridor frame is checked. A scan fails the build if a copyrighted IWAD is present. No camera and no network in the checks.