Skip to content

Implement high score submission at game end #28

@JeffSabol

Description

@JeffSabol

Description:

Add support for players to submit their high scores to a remote server when a game session ends. Initially, all scores will be unverified. A future moderation interface will allow staff to mark legitimate scores as verified.

Goals

  • Send player score to server via HTTPS when the game ends

  • Store scores on server with a verified: false flag

  • Display top verified scores on in-game leaderboard on the main page. (Crown or trophy icon)

TODO

  • Add HTTPRequest node to last level scene or use HTTPClient singleton

At the game end, collect:

Input Username

IP Address

Final score

Timestamp

{
  "username": "PlayerName",
  "score": 12345,
  "timestamp": 1590841320
}
  • On success, optionally display Score submitted!

💻 Backend

  • Accept POST requests at /submit_score

  • Validate JSON payload (basic sanity check, e.g., no negative scores)

  • Store in database with verified: false

  • Create endpoint /leaderboard returning top verified=true scores

UI

  • [ ]Add High Score panel with top verified scores
  • Add to main menu

🧪 Ensure error handling for:

  • Invalid JSON

  • No server connection

🚫 Known Limitations

  • No anti-cheat or replay validation yet

  • No authentication or HMAC signature verification (future score)

  • No way to verify scores (future scope)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions