Skip to content

Game over screen appears but score is not saved when all lives are lost during boss fight #17

Description

@woydarko

Bug Description

When the player loses all lives during the boss fight stage, the game over screen appears correctly but the final score is not recorded or displayed anywhere. The score just disappears.

Steps to Reproduce

  1. Start the game and play through all stages until reaching the boss fight
  2. Intentionally fail the boss fight by letting pests reach the end
  3. Wait for the game over screen to appear
  4. Observe — no score summary, no high score saved

Expected Behavior

The game over screen should display the player's final score and save it to localStorage as a high score. On subsequent visits, the high score should persist and be displayed on the main menu or game over screen.

Actual Behavior

Game over screen appears with no score information. Refreshing the page shows no saved score. The score variable appears to reset without being persisted anywhere.

Root Cause (suspected)

The game likely tracks score in a JavaScript variable during gameplay but never calls localStorage.setItem('highScore', score) before showing the game over screen. The score is lost when the game state resets.

Environment

  • Chrome 122 / Firefox 124
  • Windows 10 / macOS
  • Any browser (localStorage issue)

Wallet: 0x964739472C587d24934c37BEbB405CeE36D59B24

Metadata

Metadata

Assignees

No one assigned

    Labels

    bounty-invalidBug report rejected by Scarab AI

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions