Skip to main content

RGS Leaderboard

Reads a game's public tournament leaderboard from the RGS — masked names, scores and prizes — and can poll it on an interval. Browser only: it reads from the RGS but never compiles to it.

Set Game Slug and fire Fetch. The node GETs {rgsUrl}/rgs-fn/{gameSlug}/__leaderboard, a public read route that needs no key or session token, so a published game can call it from a lobby tile or an idle screen. Leave Tournament Id (blank = current) empty for the game's active tournament (the latest to start); with none active the RGS returns the most recent one, and with none at all it answers 200 with Has Tournament false and empty Entries.

Entries is [{ rank, display_name, score, prize_amount }], ordered by score, at most 100 from the RGS and cut to Limit (0 = all) in the browser. display_name is masked by the RGS: the first two characters of the player's external id followed by ••••, or Player N when there is none — no player identifier ever leaves the platform. prize_amount is in minor units. Tournament is { id, name, status, starts_at, ends_at, scoring_metric } or null; Total Players is the number of entries the RGS returned.

Loaded fires after every successful read. Failed fires with Error set on a network error, a non-2xx answer (404 Unknown game, 400 Invalid tournament_id, 503 while the tournament tables are unreachable) or a malformed body; the last good Entries and Tournament stay in place. An empty Game Slug fails without making a request. Responses that arrive out of order are dropped.

Set Poll Interval (ms, 0 = off) above 0 before Fetch to refetch on that interval. Every Fetch restarts the interval, a changed interval applies while polling, and Stop Polling or deleting the node clears it. The sibling RGS Jackpot Pools node reads the jackpot meters through the same public route family; the Slot Features guide shows where both sit.

Inputs​

Actions​

SignalDescription
FetchReads the leaderboard now and (re)starts polling when Poll Interval is above 0. Fails without a request when Game Slug is empty.

Server​

DataDescription
Game Slug (string)The game's slug on the RGS, as in its /rgs-fn/{slug}/… URL. Required.
RGS URL (string)Base URL of the RGS edge functions. Default: the RGS's production functions endpoint; a blank value restores it.
Tournament Id (blank = current) (string)UUID of one of this game's tournaments. Blank (default) means the active tournament, or the most recent one when none is active.

Polling​

DataDescription
Poll Interval (ms, 0 = off) (number)Refetch interval in ms, started by Fetch. Default 0 (off); 0 or less turns polling off. Changes apply while polling.
SignalDescription
Stop PollingStops the polling interval; the current Entries stay. The next Fetch starts it again.

Display​

DataDescription
Limit (0 = all) (number)Maximum entries kept in Entries. Default 10; 0 keeps all (the RGS sends at most 100). Re-applied at once to the current list.

Outputs​

Result​

DataDescription
Entries (array)Ranked array [{ rank, display_name, score, prize_amount }]; names are masked by the RGS, prize_amount in minor units. Kept from the last successful read.
Tournament (object){ id, name, status, starts_at, ends_at, scoring_metric } with ISO timestamps, or null when the game has no tournament.
Total Players (number)Number of entries the RGS returned, before Limit — never above 100.
Has Tournament (boolean)true when Tournament is not null; wire to the visibility of the tournament panel.

Events​

SignalDescription
LoadedFires after each successful read, including polls.
FailedFires when a read fails; Error says why. Earlier results are kept.

State​

DataDescription
Error (string)Last failure message, e.g. RGS request failed: 404 …; empty after a successful read.

Usage​

  1. Add RGS Leaderboard and set Game Slug to the slug the game was published under.
  2. Fire Fetch when the game starts or when the tournament panel opens.
  3. Wire Entries into a Repeater whose item shows rank, display_name, score and prize_amount.
  4. Wire Has Tournament to the panel's visibility and the Tournament fields name and ends_at to its header.
  5. For a live ladder set Poll Interval (ms, 0 = off) to 10000 or more, and fire Stop Polling when the panel closes.
note

The RGS marks leaderboard responses cacheable for 10 seconds, so polling faster than that returns the same standings. score counts whatever the tournament's scoring_metric names (for example total_win); prize_amount is in minor units.