# Item `characters` (batch `foundation`): result **Status: done.** The atlas, its editable source, the atlas JSON and a check are in `media/characters/`. The check passes 22 of 22 and exits 0. ## Asset path / entry points | Path | Bytes | Purpose | | --- | --- | --- | | `media/characters/characters.png` | 58243 | **Production atlas.** 512×1408 RGBA PNG, transparent, 8 cols × 22 rows of 64×64 cells. sha256 `2e449de92b7e4c0537e69f47858f202eb579e330d9d00ad9f45f58d1762f4cf5` | | `media/characters/characters.json` | 36972 | **Atlas JSON the canvas client reads.** Per skin: `row`, `id`, `name`, `tier`, `description`, `palette`, row `rect` and 8 per-frame `frames{name: {x,y,w,h}}`. Also `columns`, `animations` (timing), `anchor`, `hitboxes`, `cosmeticRules`, image sha256, `license` and `provenance`. | | `media/characters/source/{rig,render,skins,build,png}.mjs` | 59 KB | **Original editable source.** Procedural pixel art with no dependencies (Node ≥ 18 only). `rig.mjs` holds the shared body rig and the 8 poses, `skins.mjs` the 22 skins, `build.mjs` writes the png, json and preview. | | `media/characters/check.mjs` | 11983 | **Check**: `node media/characters/check.mjs` (exit 0 = pass). | | `media/characters/characters-preview.png` | 110976 | 2× review sheet (dark background, cell grid, ground line). Not used by the game. | | `media/characters/README.md` | 3555 | Layout, client usage, art rules, how to edit and rebuild, license/provenance. | Every file I changed is under `media/characters/**`, plus this result file. I touched no file outside those paths. Scratch work went in `test/scratch/`. ## What the atlas contains - **Columns** (shared by all rows): - 0–3 `run-1..run-4`: right-foot strike, pass, left-foot strike, pass. The upper body bobs 0/−1/0/−1 px. - 4–5 `duck-1/2`: a crouched scuttle. - 6 `jump-rise`: legs tucked, arm forward. - 7 `jump-fall`: legs reaching for the landing, arms up. - **Rows** (the ids the client indexes by): - 0 `classic` (free) - 1 `ninja`, 2 `cyber`, 3 `illuminati`, 4 `dragon` - 5 `pirate`, 6 `astronaut`, 7 `viking`, 8 `wizard`, 9 `punk`, 10 `zombie`, 11 `pharaoh`, 12 `knight`, 13 `robot`, 14 `skater`, 15 `magma`, 16 `frost`, 17 `phantom`, 18 `diamond`, 19 `tycoon`, 20 `samurai` - 21 `royal`: gold crown with a lime gem, plus a crimson cape with gold trim. Its JSON `perk` says: 1 extra life, distance preserved, no stacking, weekly expiry, identical hitbox. - **Foot anchor**: `(32, 60)` in every cell, which is the ground line. Run and duck frames end exactly on row 59; jump frames sit 1–2 px higher. - **Timing**: - run: 4 × 90 ms at base speed, scaled by `speed / baseSpeed` with a 45 ms floor. - duck: 2 × 110 ms. - jump rise and fall: each held while `vy < 0` / `vy >= 0`. - **Hitboxes** are one per animation and the same for every skin. They come from the shared body silhouette, inset for fairness: - run `{x:21,y:16,w:24,h:44}` - duck `{x:23,y:35,w:25,h:25}` - jumpRise `{x:23,y:15,w:22,h:44}` - jumpFall `{x:26,y:15,w:19,h:44}` - The JSON also gives each one relative to the anchor. - **Art**: - Ink-green outlines and shadows, auto-shaded 4-tone ramps with light from the upper front, frog green/lime and restrained gold. Alpha is only 0 or 255, with a 1 px empty gutter per cell. - Faces are side-on and face right: a bulging near eye with the pupil forward, a grin line and a pale throat. - Legs and arms swing in opposition, and fabric moves in every frame: shirt hems, capes, headband tails, scarves, plumes, tails, wings, wisps, mohawk and flames. - Cosmetics sit on separate layers behind or in front of the body. They never change the body silhouette and never cover the eye. - **Design note**: the mascot is an original frog character drawn for this game, not a copy of any existing character artwork. The JSON `license.trademarkNote` flags the "Pepe" name for the legal/eligibility review the goal already requires. ## How it was checked Commands run from the repository root: 1. `node media/characters/source/build.mjs`: "wrote characters.png 512x1408 (58243 bytes), characters.json, characters-preview.png". 2. `node media/characters/check.mjs`: **exit 0, "22/22 checks passed; frames=176, opaque px/frame min=542 max=970; foot rows=58,59"**. It checks: - the PNG is 512×1408 RGBA and the JSON grid and cell sizes match it; the JSON sha256 equals the PNG's - transparency: semi-alpha=0, opaque corners=0 - **all 176 frames exist** (at least 542 opaque px each) and every cell keeps its 1 px gutter - **the PNG equals a fresh render of the source** (0 differing px), so it is deterministic and traceable to the source - 22 unique ids and names in rows 0–21, in the required row order and tiers - every JSON frame rectangle matches the grid - the column names and order - animation timing is present and references valid columns - the anchor, license and provenance are recorded - the **body silhouette is identical across all 22 skins in every column**, so scale, contact poses and hitboxes are shared - the JSON hitboxes equal those derived from that silhouette - **foot anchor**: run and duck frames touch row 59 in every skin; jump frames are lifted - contact frames plant the leading foot ahead of the anchor - **every skin animates**: - the 4 run frames are pairwise distinct, and so are the 2 duck frames and rise vs fall - **the leg, arm and fabric pixels each change between every consecutive run frame**, in duck and in jump - the eye is visible and unobstructed in every frame, on the front half of the head - **cosmetic clearance**: 0 cosmetic pixels ahead of the hitbox's leading edge, within 5 px of the ground, or more than 9 px above the hitbox - every pair of skins differs in at least 12% of visible pixels - the Royal row has gold crown pixels (33) and a cape (111 px). 3. Mutation test in scratch: I copied `media/characters` to `test/scratch/mut` and erased one frame (row 7, col 3). The copied check then reported 19/22 and failed on exactly three checks: "all 176 frames exist" (min=0), "JSON sha256" and "equals a fresh render" (814 px). So the check does catch a missing frame or a tampered PNG. 4. I rendered previews at 2–3× and looked at all 22 rows. This turned up four cosmetics (Dragon tail, Astronaut pack, Zombie rag, Tycoon coat tails) that came within 5 px of the ground in the duck frames. The check flagged them too; I fixed them in `skins.mjs`, rebuilt, and the check now passes. ## Needs the merged tree / left for others - The canvas client (another item) still has to load `characters.json` and draw `skins[id].frames[columnName]` at `playerPos − anchor`, using `hitboxes[animation]` for collision. It must not use the cosmetic pixels for collision. That wiring can only be checked once it is merged. - The skin ids and row order here are the shared contract with the contract and shop items. Those items need to use the same 22 ids, or map numeric skin ids to `row`. - The `license.spdx` value (`LicenseRef-PEPE-RUN-Project-Asset`) is for the project owner to set or replace with a public licence. Clearing the "Pepe" name is part of the goal's legal/eligibility review. - I added no dependencies and changed no `package.json`. The generated files are deterministic for a given Node zlib; the check compares pixels, not PNG bytes.