# IDEA.md – a side-scrolling arcade game of your own in the browser This is a self-contained brief. Give it in full to Claude Code (or a similar tool), ideally together with a design package from Claude Design, to build a game of your own. It draws on Thaleon, a side-scrolling arcade game in the spirit of Rygar that was designed in Claude Design, built in Claude Code and given its icon by Codex. ## 1. What to build A side-scrolling action game in the browser with the mechanics of the classic arcade games and entirely original content. The model may only lend genre and mechanics – no names, characters, logos or graphics. In Thaleon: - **24 rounds in six realms**, each with a time limit, checkpoints and a shrine at the end that adds up time, foes slain and stones (doubled if you didn't die in the round) - **a hero** with a weapon on a chain: throws forwards, crouching, in the air and in an arc overhead; jumping on a head stuns; ropes to climb - **one hit kills**, three lives, extra lives at fixed scores, continues only in the early rounds - **stones that rise and drop items** when the weapon breaks them: power-ups, points, time, lives - **a chaser that comes when time runs out**, passes through walls and speeds up - **two bosses** with their own phases - **an attract loop, menus, options** (scale, scanlines, shake, volume, assist mode, rebinding) and a shared high score table ## 2. Stack and architecture What **matters** is marked; the rest can be swapped. - **TypeScript and Vite, plain Canvas 2D, no game engine.** 384 × 216 internally, integer-scaled with letterboxing, a fixed 60 Hz time step. - **Important: the design package's images and data are the truth.** Characters, tiles and backgrounds as PNG strips with an atlas (frames, anchors, timings), game data as JSON (physics, enemies, power-ups, scoring, every round). Import them as they are – never copy or edit them in the code. Draw the screens in code after the design's own screenshots, so they can be compared pixel for pixel. - **Important: physics and reachability without browser dependencies**, so the tools run exactly the same physics as the hero. - **The high scores**: a small PHP API that saves to a JSON file outside the web root, with a plausibility check per round and a limit per address. `localStorage` as a fallback. No database. - **Sound**: synthesised chiptune in Web Audio, a track per realm plus boss, title and screens, and effects. No sound files. ## 3. Decisions that turned out to matter **A round generator instead of hand-drawn rounds.** The design has one complete first round and game data for all 24. The others are built by a generator with one seed per round, from each realm's own building blocks: pits with liquid, bridges, steps, ropes up cliffs too high to jump, stone pillars in lava, islands over the void. The width of a pit follows the jump physics. A round is written only when the reachability analysis reaches the goal – otherwise the next seed is tried. The generator is deterministic: change the generator and re-run it, never hand-edit a generated round. **Reachability with the game's own physics.** The test simulates real jumps with the same code as the hero and checks that the goal or the boss arena can be reached from the start and that every stone stands on reachable ground. **A play test that steps exactly.** A hook in the game that freezes the loop, steps n ticks and lets the test drive input. Test the flow through every screen, the options, the physics (running speed, jump height and length), the weapon's reach, every enemy, every item, death and continue, entering a name on the high score table, both bosses, the ending and a run through every round. **Interpret where the design leaves something open, and write the interpretation down.** ## 4. Pitfalls - **Low enemies below the weapon's height.** A weapon at waist height doesn't hit what's lower. Give the hero a crouching throw, straight ahead at hand height. - **A background that blends into the playfield.** The nearest parallax layer may need drawing darker – replace each colour with the nearest colour in the same palette, so the palette holds. - **Stuns that can be repeated.** Jumping on an already stunned enemy shouldn't stun it again. - **Playtest early.** The design's numbers (the weapon's reach, the throw's angle) needed adjusting after the first playtest. - **Don't trust scores from the client.** ## 5. Requirements and measurements - Running speed around 1.5 px per tick, a jump around 54 px high and 62 px long, a weapon reach around 72 px. - All 24 rounds reachable according to the test; the play test green through every round and both bosses. ## 6. How it's verified - Type checking before the build. - The reachability test for every round, and the play test in a headless browser against the built game, including that the high score API answers. - Game feel, difficulty, sound, gamepad and mobile playtested by a human. ## 7. Way of working - **Tasks in order**: engine, hero, enemies, stones and items, rounds and reachability, bosses, screen flow, sound, high scores. - **Playtesting as a task of its own**, with a list of what to feel for. - **Design updates go in as they are**, when they arrive. ## 8. The prompt > Build a side-scrolling action game in the browser in [TypeScript and Vite on plain Canvas 2D], with [Rygar] as the model for the mechanics but with entirely original content. [24] rounds in [six] realms, a hero with [a weapon on a chain], stones that drop power-ups, a chaser when time runs out, [two] bosses and a shared high score table. > > Read all of IDEA.md below first, and the design package if there is one. The design's images and data are the truth. > > Work like this: > 1. Split the build into tasks and ask me about whatever is open. > 2. Build the rounds with a deterministic generator, and write a round only when a reachability test with the game's own physics reaches the goal. > 3. Add a hook that steps the game exactly, and test the built game in a browser. > 4. Let me playtest early. > > [paste IDEA.md here]