Make Your Own In-Game Leaderboard in Verse
This tutorial builds on the concepts in Persistent Player Statistics, so go check that out first!
Leaderboards are a staple of competitive games, letting players show off their skills and make their name known. They help players develop a sense of progression and encourage players to keep coming back so they can see themselves rise to the top.
Verse Persistence provides the tool that lets you build these leaderboards and add that competitive edge to your experience. You’ve already seen how you can track persistable data between play sessions in the persistent player statistics tutorial, and how to modify and update that data based on different events. Now you’ll apply that knowledge to learn how to create full local leaderboards, sort player stats, and put it all together in a racing game!
Verse Language Features Used
- Class: This example creates a persistable Verse class that tracks a group of stats for a per player.
- Constructor: A constructor is a special function that creates an instance of the class it is associated with.
- weak_map: A weak_map is a simple map that cannot be iterated over. Verse persistable data is required to be stored in a weak_map.
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.