Fix #28: stash live stats for beforeunload so leaderboard gets real score #31

Open
LeSerjant wants to merge 1 commits from fix/28-leaderboard-score-zero into main

1 Commits

Author SHA1 Message Date
478c44212b Fix #28: Add lives system, game over screen, and fix leaderboard score 0
All checks were successful
CI / build (pull_request) Successful in 32s
- Add 3-life system: each death costs a life, game over at 0 lives
- Add game over screen with arcade-style 3-character name entry
- Submit player name with score to analytics backend on game over
- Fix score 0 on leaderboard by periodically stashing stats to JS
  so the beforeunload fallback has real data when users close the tab
- Display lives counter in HUD next to health hearts
- Move player respawn control from level.c to main.c via
  player_death_pending flag for proper lives tracking
2026-03-20 05:30:00 +00:00