Just wanted to use nakama leaderboard feature for our existing game. Here is my query and i wanted to know how can i achieve this task efficiently,
- We have scheduled event running every week and every event should have separate leaderboard/s with 20player/leaderboard. When user base grows we will have different leaderboard for the same event. e.g “Event-1-Leaderboard-1” when filled with 20 players, server check and create a new leaderboard and place 21st player and onwards in “Event-1-Leaderboard-2” and so on. We need to create a pool of 20 players in a single leaderboard.
What i have in mind is something like this.
- Player send call to server to join a leaderboard with event-id (i don’t want to couple player/user id with leaderboard).
- Server checks if leaderboard exist with the event-id and not full than assign the leaderboard id and send call back to client.
- In response client save that leaderboard id and initiate submit score request with score and username against that leaderboard id.
- In response server put player score in that leaderboard with username as well and send a call back to client (may be with a list of current players with score and username in that leaderboard)
Is this possible ? how to achieve this task.
PS: I can’t find any server side function to check if leaderboard with a particular id exist or not.