Skip to content

[Event Leaderboard] Replace client-side zone calculation with server TierDelta#35

Open
yinnie wants to merge 2 commits into
mainfrom
eventlb_tierdelta
Open

[Event Leaderboard] Replace client-side zone calculation with server TierDelta#35
yinnie wants to merge 2 commits into
mainfrom
eventlb_tierdelta

Conversation

@yinnie
Copy link
Copy Markdown

@yinnie yinnie commented May 20, 2026

Hiro 1.33 update adds TierDelta to IEventLeaderboardScore. This now exposes the server's computed tier outcome per player. Now it's possible to remove the client-side zone boundary logic. And to demonstrate how to use TierDelta directly.

Changes

  • Previously, the client re-derived promotion and demotion cutoffs by reading ChangeZones percentages or RewardTiers rank ranges from the leaderboard config, then comparing each player's rank against those cutoffs.
  • The new implementation reads TierDelta directly from each score and detects zone transitions.

Testing

  • Tested locally against a local Nakama + Hiro server using the Food Battles event leaderboard with 4 accounts.
  • For testing, the server config reward tier rank ranges were adjusted to fit a 4-player cohort (demotion from rank 3+)
  • Rank 1: tier_change: +1 (promote)
  • Rank 2: tier_change: 0 (stay)
  • Ranks 3-4: tier_change: -1 (demote)
  • and the reset schedule shortened to */3 * * * * with a 90-second duration to allow multiple phases in a single session.

Phase 1. Bronze tier 0.
All promoting.
Screenshot 2026-05-20 at 14 52 07

Phase 2. Silver tier 1 (showing demotion, based on our rank config)
Screenshot 2026-05-20 at 14 55 34

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 20, 2026

CLA assistant check
All committers have signed the CLA.

{
/// <summary>
/// Helper class to calculate promotion and demotion zone boundaries for event leaderboards.
/// Helper class to build a display list with promotion and demotion zone indicators
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So satisfying!

@trandromeda
Copy link
Copy Markdown
Contributor

Thank you for the thorough description and testing results @yinnie. Great changes

@trandromeda
Copy link
Copy Markdown
Contributor

Before deploying, we should update our Heroic Cloud instance first so the changes take place without breaking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants