Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Snail Race rules: a tested `snail-race/race.js` where you pace a snail down a garden lane against three rivals, spending slime for bursts, from plain data #202
commented
Parked by the crew: the check stayed red through 2 automatic tries (pull #224 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.
Sign in to join this conversation.
A new Racing game for the catalogue: four snails race down a garden lane; you press in rhythm to keep your snail moving and spend slime on bursts, while seeded rivals keep their own pace. Rules only: no page and no catalogue entry yet.
Done looks like:
snail-race/race.jsholds the rules as plain data in, plain data out, with no DOM.start(seed)gives a stated lane length, a stated slime supply and three rivals with seeded pace curves; the same seed always gives the same rivals.tick(state, dt)moves every snail; your snail's speed rises whenstep(state)lands within a stated window of the beat and falls on an off-beat step, between a stated floor and cap.burst(state)spends a stated amount of slime for a stated speed boost and is refused when slime is short; slime refills a stated amount per on-beat step up to the supply.snail-race/race.test.mjsasserts each rule above: the same seed giving the same rivals, on-beat and off-beat steps moving the speed within floor and cap, a burst spent and refused, the slime refill, and the finishing order with the win and loss lines.bun testpasses for the new file.Files:
snail-race/race.js,snail-race/race.test.mjs. Risk: none outside the folder. Do not touchshell.js,index.html,town.jsorrounds.mjshere. Fits: a builder.