Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'd like to create a leaderboard that shows how many games each player has played. This works fine for the "all time" section in Game Center, since I can just submit the total number. But what I really want to display is the number of games each player has played in a week, not for all time.

As I understand it, I would have to calculate the weekly numbers myself (if I submitted the all-time totals, the weekly tab in Game Center would still just show the total all time numbers from that week, not the weekly totals).

What would be the best way to do this? Count a user's tasks beginning on Monday, and reset them on Sunday? Or have everyone on their own unique 7 day timer?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

In general, the big disadvantage of the fixed window approach (Monday through Sunday) is that new players will need to work very hard to achieve a competing leaderboard count in that first week, relative to old players, unless they happen to start playing on the first day of your score tracking period).

The disadvantage of the running window approach is that you can't even post a new player's count to the leaderboard for a week, and all players are potentially using a completely different time window.

The first disadvantage is much smaller than the second: it applies only once, whereas the disadvantage for the running window approach lingers for the lifetime of your game. This makes it a lot more difficult to perform aggregation reports on data for a player's lifetime. For example, if you are generating reporting information purely on the leaderboard statistics (so you don't have the origin of each player's unique week window), getting information about play counts per month is going to be tricky since months are not all a fixed time period.

Consequently, you should track these events using a fixed time window.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.