# QR fps ## What this builds A tiny first-person game in a corridor or two, packed into a payload that a QR code can carry. The world, the art and the palette are original. No copyrighted IWAD or commercial asset is used, in the build or in the checks. A test can decode the payload (from the QR image or from the raw bytes), boot the game, walk a scripted path, and assert a position and an item pickup. A golden frame is taken in the corridor. Read `spekkr.inputs.json` first. `title` is on the boot screen. `scale` sizes the written QR image. `code` chooses a QR or a raw payload file. `minimap` and `dither` change the picture, not the world. ## Out of scope - Any copyrighted commercial game data or name in the UI or the files. - A camera in the checks; decoding uses a library on the written image, or the raw bytes. - Network, multiplayer, or a level editor in this version. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. The payload - The world, the textures, and a tiny engine are packed into a documented payload of at most 2,953 bytes (QR version 40, binary, if `code` is `qr`; the raw file must be the same bytes). - A packer writes the payload and, if `code` is `qr`, a PNG of the code at `scale`. - A decoder reads the PNG or the raw file and recovers the exact bytes. Accept when: the packed bytes are at most 2,953, the QR PNG decodes to those bytes, and the raw file matches them. ### R2. Boot and walk - Boot shows `title` for 2 seconds (tests may skip the wait) and then the first-person view at the spawn in `design.md`. - `fixtures/qr-walk.json` is a list of steps (turn, forward) that ends at a documented position and heading, and picks up item `key-0`. - The walk is deterministic. Collision with walls is a slide along the wall. Accept when: after the walk, position and heading match the file within 0.05 units and 0.5 degrees, and `key-0` is in the inventory. ### R3. Frames and rights - Frames: the QR image, the boot title, the corridor at spawn, and the view at the pickup step. - A licence file lists every asset and states they are original or permissively licensed. A test fails if a known copyrighted IWAD filename or marker is present in the repo. Accept when: the four frames match the goldens, and the IWAD scan is clean. ### R4. Files - One command packs, decodes, walks, scans, and writes the frames. No network. No camera. Accept when: the command passes for both `code` kinds. ### R5. Inputs - The build reads `spekkr.inputs.json`. Settings label the UI, options turn features on or off, and a swap must be one of its choices. - A value outside a stated range, or a swap that is not one of its choices, is refused before the app starts its checks, with a message that names the key. Accept when: the default inputs render, an illegal swap is refused by name, and changing a visible setting (for example the title) shows up in a later check. ## Verification 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. ## Definition of done - Every acceptance check above runs from one command, and all pass at the person's inputs. - A README says how to pack the code, how to play, and how to run the checks.