Sign In Register

How can we help you today?

Start a new topic
Answered

Daily - Monthly Location Based Leaderboards

Hello,


In our game, we have a leaderboard page and we want to filterleaderboard item according to time(month-day-alltime) and/or location. I could  partition the leaderboard for only one of them, but this time I cannot get all the info in the leaderboard. How can I manage to have different listing for one leaderboard? 


Kind Regards


Best Answer

Hi Seclan,


What you'll need here is an event that takes a score, country, day and month, we'll be grouping the country,day and month values, you can set your event up like below.


 

The important thing here is Default Values for the Day and Month attributes, for day we're using ${today} (this will get the timestamp of the start of the current day) and ${today:startOfMonth()} (this will get the timestamp of the start of the current month), so each time its a new month or day, you'll get a new partition automatically. Next you can set up 3 Leaderboards, Day, Month & Global. My Global one looks like below.


This Leaderboard is only interested in the Score and Country attributes from the event we've just created.



Next you can create your monthly leaderboard like below. This setup is again using the data from our original event only it will be creating a partition for each new month and each score from a unique country in that month.



Finally you can create your daily leaderboard like below. It will work the same as the monthly one only a partition will be created on each day a score is posted and will again be partitioned by each unique country supplied.



To test this I posted a score of 700 from IRELAND from one user and 600 from the UK as another. Now navigate to the manage screens and click on "Leaderboards" to view the results. The Global board looks like this.



The daily results looks like below, as you can see the scores from the two countries have been placed into their own partitions based on the day & country



Finally our monthly results looks like below. Same as the daily ones only partitioned by month and country.



Try that out and let me know if it helps. If you have any further questions just let me know.


Thanks,

Liam


Hi Seclan,


What kind of information will you be displaying on your Leaderboard, just score and country ? You could set up a partitioned Leaderboard system that will create all of the partitions for you. The following config may be what you need.


  • Global Leaderboard with scores from people all over the world.
  • Day Leaderboard, partitioned by user country and day.
  • Month Leaderboard, partitioned by user country and month.
  • Global Monthly Board.
  • Global Daily Board.

The last two may not be needed but I thought I would add them in just in case. Let me know if this suits and I'll help you out with an example.

Thanks,
Liam 

Hi Liam,


That's what I was trying to do. However when I set partitioning for month and country at the same time, it can list the entries in "leaderboard.country.tr.month.06" but not "leaderboard.country.tr" only. How can I do that?


Can you please help me with an example


Thank You,


Selcan

Answer

Hi Seclan,


What you'll need here is an event that takes a score, country, day and month, we'll be grouping the country,day and month values, you can set your event up like below.


 

The important thing here is Default Values for the Day and Month attributes, for day we're using ${today} (this will get the timestamp of the start of the current day) and ${today:startOfMonth()} (this will get the timestamp of the start of the current month), so each time its a new month or day, you'll get a new partition automatically. Next you can set up 3 Leaderboards, Day, Month & Global. My Global one looks like below.


This Leaderboard is only interested in the Score and Country attributes from the event we've just created.



Next you can create your monthly leaderboard like below. This setup is again using the data from our original event only it will be creating a partition for each new month and each score from a unique country in that month.



Finally you can create your daily leaderboard like below. It will work the same as the monthly one only a partition will be created on each day a score is posted and will again be partitioned by each unique country supplied.



To test this I posted a score of 700 from IRELAND from one user and 600 from the UK as another. Now navigate to the manage screens and click on "Leaderboards" to view the results. The Global board looks like this.



The daily results looks like below, as you can see the scores from the two countries have been placed into their own partitions based on the day & country



Finally our monthly results looks like below. Same as the daily ones only partitioned by month and country.



Try that out and let me know if it helps. If you have any further questions just let me know.


Thanks,

Liam

Hi Liam,


Thank you very much for the detailed explanation, it helped me a lot. I can now list all daily, monthly and global leaderboards without any trouble.


Kind Regards 




Hi Seclan,


No problem at all, if you have any follow up questions after you have tested out the configuration just let me know.


Thanks,

Liam

Login to post a comment