choosing right approach for loaderboard...

0 votes

My game requires an alltime leaderbord in which everytime after a win some score would be added to previously stored score .... and also a daily leaderboard  where all the records would be zeroed at the end of the day.
So for alltime, i am following the below approach..

# saveUserScore() for the  first time, and after that for every score updation(win), getLastScore() and change it with some new score
So, is this approach okay?

and if so, how do i manage daily leaderboard with this??

or if  i am absolutely wrong with all this, kindly suggest me how to do it..
thanks in advance...

asked Mar 2 in App42 API Gateway by abhishek.gametion (28 points)

1 Answer

0 votes

Hi Abhishek,

 

To update the user score, you can use editScoreValueById function available in the Leaderboard service. Logic will remain same like getting the last score, add the new score in last one saved and update with the new score.

Regarding your second query,  I would suggest you create multiple games inside AppHQ Management Console for daily leaderboard. And at the time of saving user score, make two API calls. In which one will save user score on a daily level leaderboard and second will save entry on a global leaderboard. 

Using the above approach, will not be required you to make all users score to zero, You can directly go and delete the game to make the remove all the entries of the users.  

Let us know if you required any other information from our end. 

Regards,

Himanshu Sharma

answered Mar 3 by hs00105 (1,905 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
Migrate from Parse to ShepHertz App42
...