Hello,
I want to make an UI that shows which players has reached the max level in the game, but I need to order the max level players by the date when they maxed out their levels. I don't have any complete ideas in my mind for this.
First thing came to my mind is that adding the players to a leaderboard when they max out their levels, so that I can get the max level players on the client-side easily, but I couldn't find any way to get the entry date (data update date) in the leaderboard.
How can I do this with PlayFab?
EDIT: I have another solution for this, but I don't know how PlayFab would react when a concurrency happens in this scenario.
I will use a leaderboard, and for the statistic values, I will give every player a unique number. For example; when someone reaches the max level and the player is the first one who reached the max level, I will update the player's statistic value to 1. When someone else reaches the max level, their statistic value will be updated to 2 and so on. In this scenario, I need to track the numbers somewhere in PlayFab. I cannot use Title Data because changing Title Data takes time to update. So I thought, I can create a fake player and save the number in the fake player's read only data. The fake player will be like a Singleton. In cloudscript, when I need to update the statistic value, I will read the fake player's read only data to get the next number and update the number. There is only 1 problem for this. What happens when 2 or more players reach the max level at the same time and try to read and update the fake player's read only data?
Also, if this solution is possible, what else can I use to save the next number and to solve the concurrency problem rather than using a fake player?