Skip to content

fix: mobile layout, music, adaptive difficulty, enemy display, PWA#183

Merged
JesseRWeigel merged 1 commit intomainfrom
fix/mobile-and-bugs
Mar 18, 2026
Merged

fix: mobile layout, music, adaptive difficulty, enemy display, PWA#183
JesseRWeigel merged 1 commit intomainfrom
fix/mobile-and-bugs

Conversation

@JesseRWeigel
Copy link
Owner

Summary

  • Mobile layout (Bug 1): Characters shrink from 120px to 60px on mobile, number pad buttons are compact (44px), spacing reduced throughout so the entire game fits on a 375x667 viewport without scrolling
  • Music always playing (Bug 2): Moved BackgroundSound component outside the settings panel so it renders regardless of settings visibility
  • Adaptive difficulty guard (Bug 3): Added !state.currentLevel guard so adaptive difficulty only adjusts in Free Play mode, preserving structured level difficulty
  • Enemy count display (Bug 4): Added prominent "Enemies: X" text label above enemy sprites for clear visual tracking
  • PWA support (Bug 5): Added vite-plugin-pwa with manifest and workbox config to restore service worker support lost in Vite migration

Test plan

  • yarn build succeeds with PWA service worker generated
  • yarn test — all 160 tests pass
  • Playwright mobile viewport test at 375x667: entire game fits on screen
  • Verified enemy count decrements visually when answering correctly
  • BackgroundSound renders on level select (outside settings panel)

🤖 Generated with Claude Code

- Bug 1: Make characters 60px on mobile (was 120px), compact battlefield
  layout, smaller number pad buttons, reduced spacing so entire game fits
  on 375x667 viewport without scrolling
- Bug 2: Move BackgroundSound outside settings panel so music plays
  regardless of settings visibility
- Bug 3: Guard adaptive difficulty with !state.currentLevel so structured
  levels keep their intended difficulty throughout
- Bug 4: Add prominent "Enemies: X" count text above enemy sprites for
  clear visual tracking of remaining enemies
- Bug 5: Add vite-plugin-pwa for service worker generation, replacing
  the old CRA service worker removed during Vite migration

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JesseRWeigel JesseRWeigel merged commit 43536be into main Mar 18, 2026
2 checks passed
@JesseRWeigel JesseRWeigel deleted the fix/mobile-and-bugs branch March 18, 2026 23:09
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