Leaderboard Sysytem

Godot Version

v4.2

Question

I’m trying to add a highscore system into my game but don’t know how, can anyone help please? At the moment I’ve got a score system that displays during and after the game, but would like to have highscores appear before and after the game. Like in a separate menu that players can look at, would like to have about the 5 highest records saved.

My game: its a simple shooter arcade game where you run away from enemies while shooting them. I’m using GDScript to code

Making a highscore system that persists across play sessions requires you to save your high scores (i.e. your data) somewhere. In your case, it should probably be a save file - in a large scale context you may need to use a database.

An approach to making a simple high score system would be:

  1. Saving your high scores to a save file when the game ends
  2. Loading your high scores from your save file when the game ends

Here’s the Godot Docs on saving games which can help you get started.

2 Likes