Sign In Register

How can we help you today?

Start a new topic

Leaderboard reward calculated for previous days

Hi,


I have set up a real-time leaderboard that is partitioned by day that I show in the game. Works great.


Now I'd like to give rewards at the end of the day so I set up 'Calculate daily' leaderboard that uses the same running total. Then, I created 3 achievements (repeatable) which are triggered by this leaderboard - each achievement has Trigger data set to New global rank, and filter value set from 1 to 3 (each achievement covers 1 of the top 3 ranks).


So with this setup in place, I thought the top 3 players would earn this achievement at the end of the day. Indeed that happens, however, the achievements are being awarded not only for the past day, but also for every previous day (i.e. each leaderboard partition and to players who didn't rank in top 3 in the past day). Ideally, I'd like to give out rewards only for the past day.


Is that possible? If so, what change do I need to make to my setup?


Note I have added this 'Calculate daily' leaderboard a few days after the real-time one. Should I reset the running-totals and start anew?


Thanks,


Marcel


Hi Marcel,


You appear to have your calculate-daily and weekly boards partitioned by day and week respectively. This isn't necessary as when a leaderboard is calculated a partition will be created for you.


I'd recommend going into your calculated leaderboards and removing their partitions. By having them here you're causing extra partitions that aren't required to be created. I believe these are what are causing the issue with your achievements.


I would also recommend dropping the current leaderboards/partitions and running totals to get a fresh start with the data.


Try this out and let me know if it resolves your issue.


Regards,

Vinnie

Thank you, Vinnie. I will make the adjustments and report back soon.


Marcel

Hello again,


So I tested the leaderboards over the weekend and unfortunately, it still does not work the way I need.


I dropped all the leaderboards and running totals on Friday. Here are the results:

  • Sample scores were posted on Friday. At midnight, players were rewarded correctly.
  • Sample scores were posted on Saturday. At midnight, players were rewarded correctly. However, since the 'Daily-calc' leaderboard is no longer partitioned by day the leaderboard continued to sum scores from the previous day. I need the scores to start from zero every day.
  • Sample scores were NOT posted on Sunday. At midnight, players were reward twice (the desirable result would be no rewards). Also, since the midnight was a start of new week, rewards for weekly leaderboards were given, but also twice.

I guess I have to revert to 'partition-by-day/week' on the calculated leaderboards.

Note my achievements do not have set currency award. Instead, I give the rewards using CloudCode in user's AchievementEarnedMessage because I want the reward values to be retrievable on client using events and I don't want to have the values in two separate places. I log a message in this CloudCode and it shows that the AchievementEarnedMessage is triggered twice for each of the top 3 players.

I'd appreciate any other adjustments I could try to make.

Thanks,

Marcel

Login to post a comment