Munch Express design plan

This plan began before implementation and is kept in step with the release.

Premise and central choice

A caterpillar has mistaken himself for a train. He wears a conductor’s cap and is determined to reach Cocoon Station with enough cars to pay the fare.

Every leaf adds a colored body segment at the tail. The current tail can be spent for a power. That costs a carriage, changes the shape of the train, and can put the station fare out of reach. A longer train buys safety and a better finish, but also occupies more squares near danger.

The body carries an ordered stack of powers. The newest snack is normally spent first. Berry reverses the train and changes which old power becomes available. Planning involves food order, body position, facing, enemy timing, daylight, and the fare.

Rules and loop

  1. Read the food, body, station fare, and announced enemy moves.
  2. Crawl one square. The body follows. Eating adds a carriage and leaves the old tail in place for that action.
  3. Spend a colored tail when its effect is worth losing the length.
  4. Enemies act after the player. Daylight advances once per legal action.
  5. Reach the striped cocoon with enough cars before night.
  6. Chase a better route, a plumper arrival, or the next stop.

The body blocks movement except when entering a tail square that vacates on that action. Illegal actions leave the board and daylight unchanged. Powers cannot reduce the train below its minimum length.

Cargo Shape Power
Cabbage Veined leaves and an approximately sign Web two squares ahead. Silk stops beetles and catches a sparrow dive.
Chili Pointed pepper and triangle Burn brambles and beetles in a line ahead. Rocks stop the flame.
Berry Three berries and a turn arrow Spend the tail, then reverse the whole train.
Honey Jar and a small z Pause enemies for the use action and the next two actions. Daylight still passes.
Plain Dot Starting carriages have no power.

Sparrows mark the nearest food square before diving, with a visible countdown. Eating that food does not cancel the dive. Beetles follow visible patrol paths and mark their next step. A body hit removes that carriage and everything behind it. A head hit ends the attempt. Free undo restores the complete board, threats, counters, and cargo.

References and lessons

These are design references. All game art, boards, code, and audio are original.

Progression and intended playtime

The campaign contains 18 authored boards in six chapters:

  1. Cabbage Patch teaches crawling, growth, the fare, and daylight.
  2. Sparrow Row develops countdown timing and silk.
  3. Bramble Lane adds flame, brambles, and beetle patrols.
  4. Berry Bog makes reversals and cargo order matter.
  5. Honey Hollow combines frozen enemy phases with a moving daylight clock.
  6. Grand Metamorphosis tests several powers and hazards together.

The level tool validates known routes by replaying every action through the same rules engine used by the browser. Solver searches find short routes and expose unintended bypasses. A capped search is recorded as capped, rather than evidence that no solution exists.

The intended first campaign is roughly 20 to 40 minutes, depending on time spent planning and chasing stamps. This is a design target, not a measured claim about human players. Known solution routes take fewer actions than a first attempt. Every completed stop unlocks the next.

Each stop offers three stamps: Arrived, On time, and Extra plump. On time uses that board’s recorded par and requires no undo during the attempt. Extra plump uses a separate length target. Keeping a power, spending it, and choosing a different food order can favor different stamps.

Wild Garden draws ten unique boards across the six difficulty chapters from a route seed. The route begins with three tickets. Retrying or restarting a stop spends a ticket. Undo remains free. After each of the first nine arrivals, choose one of three perks:

Perks stack. The score rewards cleared stops, length, daylight remaining, and stamps. The best score is saved on the device. The same seed repeats the board order and perk offers.

Art, interface, and feedback

The approved visual target is a cut-paper garden field guide. Cream paper, dark green ink, pale grass, and a red conductor’s cap make a small consistent palette. Cargo has distinct shapes, symbols, and colors. Rocks look solid. Brambles look spiky. The cocoon has diagonal stripes and a fare badge. The hero illustration shows the full caterpillar, a station sign, plants, and butterflies.

The title and level headings use Georgia with a serif fallback. Controls and instructions use a familiar sans serif system stack. Fonts, vector drawing, and Web Audio stay inside the browser, so the game has no network dependency.

A desktop player sees a board beside conductor’s notes. On phones the notes move below the board and the movement, power, undo, and restart controls remain available. The board preserves its aspect ratio on resize. The interface uses real buttons, visible keyboard focus, named controls, modal focus, and live status text.

Movement eases over 155 milliseconds. The simulation changes immediately and remains independent from the animation. Eating adds crumbs, floating remarks, and a pitched chew. Powers have a short musical rise. An arrival brings a butterfly and a rising arpeggio. Reduced motion removes continuous wiggle, movement interpolation, and particles.

Audio

Web Audio routes a quiet repeating melody and effects through separate gain buses to a master bus. Repeated effects vary slightly in pitch. Win and loss sequences stay short. The sound button cycles music and effects, effects only, and off. The preference saves. Sound starts after player input.

Controls and saving

Arrows or WASD crawl. Space or E spends the tail. Z or U undoes. R restarts. Escape or P pauses. M changes sound mode. Pointer and touch can tap beside the head, tap the head for a power, swipe on the board, or use the visible buttons.

A versioned localStorage record stores unlocked stops, stamps, preferences, best score, and the active action history. Resume reconstructs the board by replaying that history. Corrupt storage falls back to a fresh save. Failure to write storage does not prevent play.

Build and verification

Plain JavaScript and Canvas produce one standalone HTML artifact. The pure rules engine also runs in Node. The build tool inlines all HTML, CSS, JavaScript, and level data and enforces the 5 MB AOG limit.

Rules tests cover movement, tail vacancy, powers, threats, daylight, deterministic cloning, known routes, and representative perk combinations. Playwright drives the exact release artifact through complete campaign and Wild Garden runs using normal input. It also checks loss, undo, restart, saves, menus, audio, pointer, touch, and five viewport shapes.

Screenshots from the title, opening, middle, late game, route map, win, loss, and mobile layouts are inspected before publishing. AOG receives the final plan and the same verified artifact. The hosted release gets a separate browser input and screenshot check. Publishing IDs and URLs are retained in the release record to make retries safe.