Sign In Register

How can we help you today?

Start a new topic
Answered

Complex leaderboards

I have some problems to have the leaderboards working the way I need.


In my game I have many levels where the user can reach always a longer distance.

Each player has a UserLevel that increase with time (as RPG games).

And for each level I have Casual mode and Hardcore mode.


Here is the event that I send when a run is completed:


The I have two running totals that should process the data filtering by the Hardcore Mode value (0 or 1):



and finally I have two leaderboards, one for casual mode, and the other one for hardcore (that also use Top N Notifications):



I did some test in the Test Harness. Just sending the data of one user.


First one:

{
 "@class": ".LogEventRequest",
 "eventKey": "EV_WT_Ended",
 "AT_WT_Distance": 1000,
 "AT_WT_CarModel": "Jeep3",
 "AT_WT_Env": 0,
 "AT_WT_CarTier": 3,
 "AT_WT_Level": "0-0",
 "AT_WT_UserLevel": 4,
 "AT_WT_StartGate": 0,
 "AT_WT_Hardcore": 0
}

The first problem is that the filtering for hardcore mode is not working. Both leaderboards where updated.


Then I sent this event with same data, but lower distance and higher user level:

{
 "@class": ".LogEventRequest",
 "eventKey": "EV_WT_Ended",
 "AT_WT_Distance": 500,
 "AT_WT_CarModel": "Jeep3",
 "AT_WT_Env": 0,
 "AT_WT_CarTier": 3,
 "AT_WT_Level": "0-0",
 "AT_WT_UserLevel": 5,
 "AT_WT_StartGate": 0,
 "AT_WT_Hardcore": 0
}

The second problem here is that the record in the leaderboards has been updated with the new UserLevel (from 4 to 5), but the distance was lower, so I wasn't expecting any update.


I need to show in the leaderboard some info connected to the moment when the user reach a new best distance, but I don't want to change that values every time a race is completed, but only if the distance is more than the previous one.


How should I do this? And why the filtering is not working?


Thanks


Best Answer

Hi Maurizio,


The reason the Hardcore leaderboard is also being called is because the custom running totals you've set up in your game are using the same event attributes that get called for the normal mode.




The best way to do this would be to create a separate set of events specifically for Hardcore mode that take the same variables and then in your game and link them to the hardcore leaderboard. Then in your game if the player is playing a Normal mode race send "EV_WT_Normal_Started" and then for Hardcore send "EV_WT_Hardcore_Started.


Shane


Hi Maurizio,


Looking into this currently.


Thanks


Oisin.

Answer

Hi Maurizio,


The reason the Hardcore leaderboard is also being called is because the custom running totals you've set up in your game are using the same event attributes that get called for the normal mode.




The best way to do this would be to create a separate set of events specifically for Hardcore mode that take the same variables and then in your game and link them to the hardcore leaderboard. Then in your game if the player is playing a Normal mode race send "EV_WT_Normal_Started" and then for Hardcore send "EV_WT_Hardcore_Started.


Shane

thank you Shane. so the filtering is used on only to exclude the value itself and not the whole update of the leaderboard. anyway you didn't answer to the second question. How can I store addition info in the leaderboard? I want to have the leaderboard to get updated only if the player reaches a longer distance, and not if the user level change, but I want to store the user level at the time of a new record. Is it possible?

Hi Maurizio,


Apologies for the delay in getting back to you, I remember answering this but apparently it didn't send.


Regarding the second question, there is no way to store additional information that isn't included in the leaderboard post score event. 


The best way to set  it so that the leaderboard only gets updated when the distance is longer and not when the level changes is to have your code only post an update if it's just a higher score they've achieved and include the level.


Otherwise it's best to have a score per level and use the partitioned leaderboards. In your event make sure your "level" attribute is set to "Grouped" and your "distance" attribute is set to "Maximum".  In the Leaderboard set the "level" attribute to partitioned


Shane

Login to post a comment