Add competitive features to your game with Ondara Leaderboards. Support real-time updates, time-based resets, and social leaderboards for friends.
Scores update instantly across all connected clients.
Daily, weekly, monthly, or all-time leaderboards.
Show scores for friends only.
Players can have scores in multiple leaderboards.
12345678910111213141516// Submit a scorevar result = await Ondara.Leaderboards.Submit("high_scores", 5000);
if (result.IsSuccess){ Debug.Log($"Score submitted! New rank: #{result.Value.Rank}"); Debug.Log($"Is new best: {result.Value.IsNewBest}");}
// Submit with metadata (e.g., level, character used)await Ondara.Leaderboards.Submit("high_scores", 5000, new Dictionary<string, object>{ { "level", "world_3" }, { "character", "knight" }, { "time", 120.5f }});12345678910public class LeaderboardEntry{ public string PlayerId { get; } // Unique player identifier public string PlayerName { get; } // Display name public int Rank { get; } // Position on leaderboard (1-indexed) public long Score { get; } // The score value public float Percentile { get; } // Top X% of all players public DateTime SubmittedAt { get; } // When score was submitted public Dictionary<string, object> Metadata { get; } // Custom data}Validate Scores Server-side
Enable score validation in dashboard settings to prevent cheating.
Use Metadata for Context
Store level, character, or game mode with scores for richer leaderboards.
Show Nearby Rankings
Players engage more when they see beatable scores just above them.
Multiple Time Frames
Daily/weekly resets give new players a chance to compete.