Skip to content

feat(game): longer races with bounded bathroom setback - #43

Merged
analiaacostaok merged 2 commits into
mainfrom
feat/longer-races-bounded-bathroom-setback
Jun 24, 2026
Merged

analiaacostaok merged 2 commits into
mainfrom
feat/longer-races-bounded-bathroom-setback

Conversation

@analiaacostaok

Copy link
Copy Markdown
Member

What

Tunes race pacing and reworks the poison bathroom break so it no longer teleports the runner all the way to the start.

  • Longer races: track LENGTH 11000 → 14300 (~30% longer) to target ~90s races.
  • Booster cadence: BOOST_ZONE_COUNT 3 → 4 so boosters stay evenly spaced on the longer course (span ~2860 vs the original ~2750).
  • Bounded bathroom setback: filling the poison bar now knocks the runner back a fixed POISON.setback (1500 units) instead of resetting to distance 0. The setback is bounded and independent of track length, so a longer course can't turn a bathroom break into a runaway loop.
  • Food re-appears: only the food in the setback stretch is un-resolved (so it redraws and stays dodgeable) — an empty track behind the runner read as a bug. The bounded window keeps it from chaining.
  • Docs + copy synced: how-to-play (en/es), GAME-DESIGN, ARCHITECTURE, MULTIPLAYER, TOUR, and CHANGELOG.

Why

A 30% longer track lands races near the casual-racing sweet spot (~90s). The original bathroom mechanic reset progress to 0 and re-enabled the whole track's food, which on a longer course could chain into an unbounded loop. The bounded setback caps the damage per break (~1500 units ≈ 8s at cruising speed) regardless of track length.

Testing

  • tsc --noEmit ✓
  • Vitest game + multiplayer suites: 67/67 ✓
  • ESLint on changed game files ✓
  • Manual: demo run ~55s with 1–2 setbacks; verified knocked-back food re-appears and doesn't chain.

Notes / follow-up

Multiplayer's FINISH_GRACE_MS (20s after the first finisher) is unchanged. With a longer track the spread between leader and stragglers widens, so if real matches show active runners ranked DNF, a follow-up should make the grace window scale with distance (or derive it from the leader's time).

🤖 Generated with Claude Code

Increase track length ~30% (11000 → 14300) to target ~90s races, and
rework the poison "bathroom break" so it no longer teleports the runner
all the way to the start.

- track: LENGTH 11000 → 14300; BOOST_ZONE_COUNT 3 → 4 so booster cadence
  stays ~constant on the longer course.
- bathroom break: knock the runner back a fixed POISON.setback (1500
  units) instead of resetting to 0. The setback is bounded and
  independent of track length, so a longer course can't turn a bathroom
  break into a runaway loop.
- un-resolve only the food in the setback stretch so it re-appears (an
  empty track read as a bug); the bounded window keeps it from chaining.
- sync how-to-play copy (en/es) and docs to the new behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bitbybit-run Ready Ready Preview, Comment Jun 24, 2026 8:10pm

Drop the "back to the start" wording now that the bathroom break is a
bounded setback, and convey that worse junk fills the poison bar faster
(per-food poison ranges 0.16–0.42, so 3–7 items fill it) instead of a
fixed count.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@analiaacostaok
analiaacostaok merged commit 35e4a53 into main Jun 24, 2026
5 checks passed
@analiaacostaok
analiaacostaok deleted the feat/longer-races-bounded-bathroom-setback branch June 24, 2026 20:10

This branch was successfully deployed

1 active deployment
Preview — 4c428e06 Deployed Jun 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant