Skip to content

Games overhaul: legibility, stat variety, GeoDraft rounds, small-state picking, Alphabet combo - #32

Merged
mapzimus merged 6 commits into
masterfrom
claude/games-overhaul
Jul 3, 2026
Merged

Games overhaul: legibility, stat variety, GeoDraft rounds, small-state picking, Alphabet combo#32
mapzimus merged 6 commits into
masterfrom
claude/games-overhaul

Conversation

@mapzimus

@mapzimus mapzimus commented Jul 3, 2026

Copy link
Copy Markdown
Owner

What this is

A games UX/UI + mode-depth overhaul driven by play-test feedback (played all five games). Six commits, each self-contained, validated and verified in a real browser via Playwright. All work is in index.html; no API changes; the games stay isolated from the export-critical editor path.

Plan: /root/.claude/plans/graceful-dazzling-mango.md (approved).

The feedback → what changed

A · Legibility — "super hard to see the category being displayed and the timer countdown."

  • The big legible category text was animation-only (a ~1.3–2.1s pop) and gone during the pick phase. Added a persistent prompt banner under the Arcade game bar (with the stat description as a sub-line) and enlarged GeoDraft's category title (17px orange-on-dark → 22px near-white with an orange accent).
  • The timer was a 5px bar with no number. Rebuilt the shared timer row with a tabular "Ns" countdown that decrements and turns red in the final 25% — inherited by every game.

B · Stat Duel + Rank It — "only one stat appeared every round every game" / "more stats."

  • Root cause: the run locked ONE dataset and reused it every round; a Census outage fell back to a single static "Total Area" stat. Now each round carries its own stat (cycle a shuffled pool, one pair/quad per round).
  • Added an offline trivia pool (area, high point, elevation, coastline, counties, electoral votes, presidents born, national parks, bordering states, statehood year) so runs stay varied even if the Census API is down — no more single-stat dead-end. Also enabled duel:true on 13 more census datasets. (Built via a lazy accessor to respect the TDZ rule.)
  • Verified: Stat Duel = 10/10 distinct stats per run, Rank It = 6/6.

C1 · GeoDraft — "drop the study up button." Removed the Practice hub card.

C2 · Territory Draft — "biggest letdown … only 3 categories after drafting 25 states each … needs way more."

  • Reworked into 5 themed rounds × 5 picks/side. After each round its hidden category is revealed and scored on that round's picks, with the exact margin, an MVP callout (your strongest pick), and a running rounds-won tally. Win the most rounds to take the map; the final screen lists every round's result. Feedback now lands every round instead of all at the end.
  • Verified: full 5-round match drives cleanly — 5 distinct categories revealed round-by-round, 25 picks each, correct tally + breakdown.

C3 · Small states — "an easier way to choose the small states too." Both mechanisms, in Territory:

  • A "Pick from list" panel of remaining states as big (44px) tappable chips, with small/hard states (RI/DE/CT/…) accent-highlighted — tap a name to claim.
  • An "NE" region-zoom button that frames the small Northeast cluster (reuses the existing zoomToPaths()).
  • Verified: list shows 50 chips (9 small highlighted), tapping Rhode Island claims it, NE button zooms 1×→4×.

D · Alphabet Race — "needs more to it but was unexpectedly fun."

  • Name-as-many combo: each letter, tap AS MANY states as you can before the clock — every state builds a combo (worth more than the last), clearing the letter pays a bonus, with a live "N of M found" counter. Invalid taps flash but don't end the round.
  • Difficulty ramp: letters ordered easy→hard (many-answer first, single-answer last) and the clock shortens 10s→~5s across the run; later letters pay more.
  • Verified: easy→hard ordering, combo scoring (12 then 18), live counter, invalid taps ignored, clear resolves.

Verification

  • npm run validate → both blocks PASS (Block 1 untouched at 34,471 chars; games never touch it)
  • npm run smoke (via SMOKE_CHROMIUM) → all 9 routes boot clean
  • Five dedicated Playwright harnesses (banner+timer, per-round stat variety, full 5-round Territory, tappable list + region zoom, Alphabet combo/ramp) — all pass together in a final integration run

Notes

  • The census key: per your call I assumed CENSUS_API_KEY is set in Vercel. If it isn't, the new trivia pool keeps the games varied regardless — but live stats won't show until the key is configured, so it's worth confirming.
  • Speed Run and Find the State were left as-is (they inherit the shared legibility/timer improvements automatically).
  • Touch/pacing items (list ergonomics, reveal pacing, banner placement) are worth a real-device pass per the project's mobile house rule.
  • Category Draft could get the same small-state helpers in a follow-up (it only drafts 3 states/round, so it's far less affected).

🤖 Generated with Claude Code

https://claude.ai/code/session_0136LsmUduBGCuJ8wg9PDhN6


Generated by Claude Code

claude added 6 commits July 3, 2026 05:33
Feedback: "super hard to see the category being displayed and the timer
countdown to pick." Both were structural:

- The big legible category text was animation-only (the 1.3s center pop),
  gone during the actual pick phase; the only persistent reference was a
  crowded ellipsized bar prompt (Arcade) or a small 17px orange-on-dark
  title (GeoDraft).
- The timer was a 5px bar with NO numeric readout in either game.

Changes (shared components → every game inherits):
- Added a persistent, full-width prompt banner under the Arcade game bar
  (#arcadeBanner) that stays for the whole prompt, with the stat
  description as a muted second line for Stat Duel / Rank It. The center
  pop stays as the attention-getter.
- Enlarged GeoDraft's category title to 22px near-white with an orange
  left-accent + surface background (was 17px orange-on-dark), raised the
  description contrast.
- Rebuilt the shared timer row: fill bar + a tabular numeric "Ns" readout
  that decrements and turns red in the final 25% — fixes Arcade, GeoDraft,
  Speed Run and Find the State at once.

Verified in a real browser: banner shows the live prompt and is visible;
timer reads seconds and decrements (8s→7s). validate: both blocks PASS
(Block 1 untouched 34,471). smoke: 9 routes clean.
Feedback: "Stat Duel — only one stat appeared every round every game" and
"Rank It ... more stats." Root cause: the run locked ONE dataset (picked
once at start) and reused it for every round; if the Census API was down,
every run fell back to a single static "Total Area" stat.

Now each round carries its own {dataset, data}:
- arcadeStartRun cycles a shuffled pool of stats and builds one pair/quad
  per round from that round's stat; the prompt, pop, banner and scoring all
  read the per-round dataset (with AG.duelDataset/Data kept as a back-compat
  pointer to round 1).
- New combined pool = live Census `duel:true` stats + an offline TRIVIA pool
  (area, high point, elevation, coastline, counties, electoral votes,
  presidents born, national parks, bordering states, statehood year) built
  via a LAZY accessor (arcadeTriviaStats) so it never trips the TDZ rule.
- Robust fallback: a failed census stat is skipped, not fatal — trivia keeps
  the run varied even with /api/census down (no more "one stat" dead-end).
- Enabled `duel:true` on 13 more rankable census datasets (population,
  median age, home value, commute time, broadband, homeownership, etc.).

Verified in a browser: Stat Duel = 10/10 distinct stats per run, Rank It =
6/6; with census unreachable the run fills entirely from varied trivia.
validate: both blocks PASS (Block 1 untouched). smoke: 9 routes clean.
Feedback: "Drop the study up button." Removed the Practice card from the
GeoDraft hub so Category Draft and Territory Draft are the two focused
entry points. The /games/draft/practice route stays wired but has no hub
entry point now (harmless; a future cleanup can remove it).
Feedback: "GeoDraft has the most potential but was the biggest letdown ...
the payoff of only 3 categories after drafting 25 states each is a huge
letdown — there needs to be way more."

Reworked Territory from "50 blind picks -> 3 binary sum-comparisons at the
end" into 5 themed rounds:
- Each round both sides draft 5 states (alternating, you first). After the
  round, its hidden category is revealed and scored on THAT round's 5 picks.
- Per-round reveal card: category + description + rule, your total vs AI
  with the exact margin, an MVP callout (your strongest pick that round),
  and a running rounds-won tally with per-round dots.
- Win the most of 5 rounds to take the map; the final screen lists every
  round's winner. Feedback now lands every round instead of all at the end.
- Reuses the totals the engine already computed; the category loop now
  takes 5 (was 3). Copy (hub card + how-to) updated to match.

Verified in a browser: full 5-round match drives cleanly — 5 distinct
categories revealed round-by-round, 25 picks each side, running tally and
final breakdown correct, no errors. validate + smoke green.
Feedback: "maybe an easier way overall to choose the small states too."
Small states (RI/DE/CT/NJ/NH/VT/MA/MD/HI) are tiny polygons that are hard
to tap on a phone. Added two mechanisms to Territory Draft:

- "Pick from list": a toggleable panel of the remaining states as big
  (44px) tappable chips, sorted alphabetically, with the small/hard states
  accent-highlighted. Tapping a chip claims that state through the same
  path as a map tap and updates live as picks happen.
- "NE" region-zoom button: frames the small Northeast cluster using the
  existing makeMapZoom zoomToPaths() helper so the tiny states blow up big
  enough to tap on the map directly.

Verified in a browser: list shows 50 chips (9 small ones highlighted),
tapping Rhode Island claims it and drops it from the list, NE button zooms
1x->4x. (Category Draft only drafts 3 states/round so it's far less
affected; it can get the same helpers in a follow-up.) validate + smoke green.
Feedback: "Alphabet Race needs more to it but was unexpectedly fun." It was
one tap per letter — effectively a disguised single find. Now it has depth:

- Name-as-many: each letter, tap AS MANY valid states as you can before the
  clock. Every state builds a combo (each worth more than the last, via
  arcadeAlphaTap), and clearing every state for the letter pays a bonus +
  remaining-time bonus. A live "N of M found" counter shows in the banner.
- Invalid taps flash but don't end the round (forgiving); the round ends on
  timeout or when the letter is cleared. Missed states are revealed to learn.
- Difficulty ramp: the 10 letters are ordered easy→hard (many-answer letters
  first, single-answer last) and the per-round clock shortens 10s→~5s as the
  run progresses; later letters also pay a round multiplier. Medals rebalanced.

New engine paths: arcadeAlphaTap / arcadeResolveAlpha (alpha no longer routes
through the single-tap arcadeResolve), arcadeStartTimer honors a per-prompt
AG.promptSecs override. Verified in a browser: easy→hard ordering, combo
scoring (12 then 18), live counter, invalid taps ignored, clear resolves.
validate + smoke green.
@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
mapparatus Ready Ready Preview, Comment Jul 3, 2026 5:57am
tappymaps Ready Ready Preview, Comment Jul 3, 2026 5:57am

@mapzimus
mapzimus marked this pull request as ready for review July 3, 2026 09:42
@mapzimus
mapzimus merged commit eb912b5 into master Jul 3, 2026
4 checks passed
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.

2 participants