Closed gbusto closed 5 years ago
Typical flow could be something like:
Need to expose functions to save/load scores from game center, update score on disk, report new high scores, and retrieve and store their current rank. There may be no way to determine the rank of those above and below them, so the only way we know if they moved up or down in rank is if we keep it persisted.
Information I could report to the user:
I don't think it would be good to let the user know when they slip in rank because it could be demoralizing. Instead, I think the best and simplest path forward is to prompt the user when they're within 10 levels of the person in front of them, or 100 points behind the next ranked person and tell them they're close to moving up in rank.
Separating this out into 2 tickets: #638 and #640. #638 is done already, but I don't have a good plan for creating a prompt, what it should look like, what it should say, and when to show it. So until that time I will not finish the second half of this issue (#640).
When a user is logged into GameCenter, get their position on the leaderboard and congratulate them if they make it to within a certain percentage of the entire leaderboard. Also if the user isn't logged into GameCenter, notify them and tell them what they get with it.
Maybe this encouragement can be displayed on the Game Menu based on their position on the leaderboard. The "Congratulations!" popup can be immediately when they break a record based on their score/level count. I don't want to keep all of this in a persistent data structure because every time I update that structure in the future, the data will be lost (although this can maybe be fixed by me checking to see if the saved file for a structure is present, if it is load it into the old data structure and copy those fields into the new data structure, and write the new data structure to disk and remove the old one).
The other cool thing is to give the user immediate feedback about their position in the game. If they're playing classic mode and they reach 247 (for example) and only 50% of users ever make it that far, let them know with some popup.