Skip to content

Otter Stop: geometric speed progression + consistent image sizing#65

Merged
acrosman merged 2 commits intomainfrom
copilot/enhance-otter-stop-speed-and-images
Apr 15, 2026
Merged

Otter Stop: geometric speed progression + consistent image sizing#65
acrosman merged 2 commits intomainfrom
copilot/enhance-otter-stop-speed-and-images

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

Two UX issues with Otter Stop: speed increments were a flat 50 ms/level (too slow to challenge players), and go/no-go stimulus images were displayed ~60 px smaller than their container while feedback images filled it entirely.

Speed progression (game.js)

Replace linear decrement with geometric decay (×0.88 per level):

// Before: flat 50 ms/level
const INTERVAL_STEP_MS = 50;
return Math.max(BASE_INTERVAL_MS - level * INTERVAL_STEP_MS, MIN_INTERVAL_MS);

// After: large early jumps, tapering increments
const INTERVAL_DECAY_RATE = 0.88;
return Math.max(Math.round(BASE_INTERVAL_MS * (INTERVAL_DECAY_RATE ** level)), MIN_INTERVAL_MS);
Level Before After Drop
1 1450 ms 1320 ms −180 ms
5 1250 ms 793 ms
Floor reached level 27 level 19

Image sizing (style.css)

Remove the min(440px, calc(50vmin - 60px)) constraints on .os-stimulus__img and use width: 100%; height: 100%; object-fit: contain — matching how feedback (success/failure) images already fill their container.

Tests (tests/game.test.js)

Updated two getCurrentIntervalMs() assertions to match the new formula (level 1 → 1320 ms; floor-clamped test now needs 57 iterations instead of 81).

Copilot AI linked an issue Apr 14, 2026 that may be closed by this pull request
- Replace linear 50ms/level speed step with geometric decay (rate=0.88),
  giving ~180ms jumps at low levels tapering down as the game speeds up
- Fix .os-stimulus__img to fill container (width/height 100%) matching
  feedback images, removing the inconsistent 60px margin
- Update game.test.js to reflect new interval values (level 1 → 1320ms,
  floor reached at level 19 instead of 27)

Agent-Logs-Url: https://github.com/acrosman/BrainSpeedExercises/sessions/fb773e3e-8af1-4904-8604-366062d9b0ab

Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve Otter Stop speed and enlarge images Otter Stop: geometric speed progression + consistent image sizing Apr 14, 2026
Copilot AI requested a review from acrosman April 14, 2026 03:46
@acrosman acrosman marked this pull request as ready for review April 14, 2026 22:15
@acrosman acrosman merged commit d95b7b2 into main Apr 15, 2026
6 checks passed
@acrosman acrosman deleted the copilot/enhance-otter-stop-speed-and-images branch April 15, 2026 00:43
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.

Otter Stop is too slow

2 participants