SsimnJS Docs

Leaderboard Panel

A leaderboard board that stands in your island, with per-player pages and aim-and-click buttons.

Leaderboard Panel is a leaderboard board you place in your island. Every player turns its pages on their own copy, by aiming at its buttons: no UI mode, no cursor, gameplay never stops.

Features

  • A polished panel in the world: layered card, podium emblem, gold, silver and bronze top three, pill buttons with a hover halo and press feedback.
  • Four variants, from 1 to 4 stat columns, all the same size. Names take the remaining width and scroll when they are too long.
  • Per-player pages: each player gets a personal copy of the panel at the spot where you placed it, so nobody turns the page for someone else.
  • Aim and click: fire on a button, or use the native interact prompt, which also works on mobile and controller.
  • Rankings: unlimited entries, 10 rows per page (or fewer), automatic ranking on the column you choose, shared ranks on ties (1, 2, 2, 4).
  • Value formats: integer, decimal, compact (12.5K), time (1:05.32) and percent, with a prefix and a suffix, in four number styles.
  • Settings in the Details panel: colours, labels, prompts, rows per page, back to page 1 after a delay.

How it works

  1. You place a WBP_Leaderboard_* widget in the level and add leaderboard_panel_component to it.
  2. A board component next to it holds the data: the title, the columns and the entries. It is Verse code, written for you by the free board editor from a spreadsheet.
  3. When the round starts, every player gets their own copy of the panel and turns its pages alone.

Rankings live in your code

The entries are written in Verse, so they change when you publish an update of your island. Verse has no global leaderboard API.

What the package contains

  • LeaderboardPanel/Widgets/: WBP_Leaderboard_1Stat, WBP_Leaderboard_2Stats, WBP_Leaderboard_3Stats and WBP_Leaderboard_4Stats.
  • The LeaderboardPanel Verse module, with its helper code (LeaderboardPanelLib): no other dependency.
  • leaderboard_demo_board: an example board with 21 entries and three stats.

On this page