Hi,
We are currently implementing a tournament system where groups of 20 people will compete against each other over the same statistic for once every 2 weeks. Considering our active number of players, we may have up to 3000 different groups.
When a user wants to join the tournament, they will automatically be added to the last group created with the <20 user count. If there is no such group, new one will be created.
e.g.
Group-1 20 users
…..
Group-410 users<- new users will be added this tournament group, until it is full
We did consider using Leaderboard feature of the Playfab; however, our tournament requirements seem not possible to implement with Leaderboard.
- Current Leaderboard system does not support child leaderboards, for ~3000 groups with 20-users
- There is a limit of total 300 leaderboards being active in the title
Leaderboardv2’s child leaderboard functionality seems very appropriate for our design, but it is in private preview; so, we cannot use it.
We thought about a workaround using with Groups and custom CloudScript functions in Playfab. The flow is described below:
- Create a group with an our own admin user
- Users calling custom “join_tournament” cloudscript function, will be added to this newly created group.
- If number of users in this group, exceeds 20, new group will be created for upcoming users.
- When users make progress in the tournament and call “update_score” custom cloudscript function, we will update “leaderboard” key in “Objects” in that group, which will form the leaderboard of that specific group.
- Users will fetch leaderboard by calling a custom “get_leaderboard” cloudscript function. We will directly return the “leaderboard” key from Objects of that group, like so:
“leaderboard”: [
{“player_id:”AA”, “score”: 29},
{“player_id:”BB”, “score”: 30},
{“player_id:”CC”, “score”: 15},
]
However, we can’t decide between using our custom workaround for this feature or waiting for the Leaderboard v2 of the Playfab. Or can there be a way to use current Leaderboard system considering our requirements?
What would be the best practice?