Sign In Register

How can we help you today?

Start a new topic
Answered

[Time based Leaderboards] Retrieving highscores for archiving

Hello,


I'm currently working on a project in which I need to be able to:

  • Have time based leaderboards that reset every two weeks
  • Being able to retrieve the top 5 players before the reset happen

I've looked at the documentation and this "forum" but I wasn't able to find a correct answer. My questions are:

  1. Is there a way of retrieving my top-5 players at the end of the leaderboard duration? Is there any backup made somewhere I can access?
  2. Is it possible to reset our leaderboard every two weeks?
  3. Or, what would be better for us, is there a way of sending a request through code to Gamesparks servers in order to ask for a reset of the leaderboards? Like that we would be in total control of our flow.

Any help will be much appreciated! Thanks!
Loïc

Best Answer

Take a look in the Admin portal on Cloud Code -> System -> Every Day


Any code you put in here will run every day. You can do a simple date diff in days, and once the current date, and the previous reset date are 14 days, do your reset again and update any tables etc. 


Obviously before you do the reset, just query your leaderboards table for the top 5, and insert them into some other table for reference.

1 Comment

Answer

Take a look in the Admin portal on Cloud Code -> System -> Every Day


Any code you put in here will run every day. You can do a simple date diff in days, and once the current date, and the previous reset date are 14 days, do your reset again and update any tables etc. 


Obviously before you do the reset, just query your leaderboards table for the top 5, and insert them into some other table for reference.

Login to post a comment