#Leaderboards setup
1 messages · Page 1 of 1 (latest)
Hi @tiny tundra , unfortunately you won't be able to use buckets or tiers to segment your userbase. While you could create 1 leaderboard per track, per car class, I think you should be able to achieve the result you want with the metadata option when interacting with the leaderboard service.
You'd have to make sure to input this metadata when submitting scores
async Task SubmitScore(string leaderboardId, double score)
{
var metadata = new { carClass = "<insert-car-class-here>" };
await LeaderboardsService.Instance.AddPlayerScoreAsync(leaderboardId, score, new AddPlayerScoreOptions() { Metadata = metadata});
}
And you'd also have to include metadata when fetching the scores
async Task GetScores(string leaderboardId)
{
await LeaderboardsService.Instance.GetScoresAsync(leaderboardId, new GetScoresOptions() { IncludeMetadata = true}))
}
Once you have the entries with the metadata, it will be up to you to filter the scores you have received by car class.
Thanks for the quick reply
That sounds good, one thing though, can a player have seperate scores in a leaderboard with different metadata?
I personally haven't used metadata so I'm not sure how it will work if a user has scores with and without metadata. I think it will also depend on the strategy for score submission; if it's set to Keep Best and they submit a lower score, I don't think the new score will be kept.
So while my suggestion may work in part, I'd recommend you try out the different scenarios you have planned and act accordingly. It's possible your original solution of 1 leaderboard per track per car class is actually the best solution.
I'll try and find a dev from the Leaderboards service to answer the first question, but that may take some time to get an answer for you.
Alright, i'll go with the one leaderboard per class/track combination for now
Unless players can have multiple scores per leaderboard, the metadata variant won't work for us, our leaderboards are set to keep best, so scores for slower car classes would never end up on the leaderboard
That approach will definitely work, it'll just be a bit more work on your end to create all the leaderboards and set them up as you want. I'll follow up when I have an aswer from the Leaderboards service devs.