Sign In Register

How can we help you today?

Start a new topic
Answered

Max World - Level Leaderboard

 Hi,


I'll try to create a leaderboard where we list the max world and max level in the world the players reach.


I created this event with four attributes:


Event


and the leaderboard:


Leaderboard


but when I request the data I get the max world (ok) and the max level, not for this world but for all the game. For example:


Event submit 1:

{
  "@class": ".LogEventRequest",
  "eventKey": "SUBMIT_LEVEL",
  "WORLD": 2,
  "LEVEL": 5,
  "MODE": "normal",
  "TIME": 5
}


Event submit 2:


{
  "@class": ".LogEventRequest",
  "eventKey": "SUBMIT_LEVEL",
  "WORLD": 1,
  "LEVEL": 7,
  "MODE": "normal",
  "TIME": 10
}

The response send me back the max world sending in the first submit and the max level sending in the second submit:

{
  "@class": ".LeaderboardDataResponse",
  "data": [
  {
  "userId": "58c0b6f8d88f5d05605df2a4",
  "WORLD": 2,
  "MODE": "normal",
  "TIME": 10,
  "LEVEL": 7,
  "when": "2017-03-15T19:10Z",
  "city": null,
  "country": "CO",
  "userName": "Miguel Correa",
  "externalIds": {
  "FB": "10153869775256849"
  },
  "rank": 1
  }
  ],
  "leaderboardShortCode": "NORMAL_LAST_LEVEL"
}


I expected something like this:


{
  "@class": ".LeaderboardDataResponse",
  "data": [
  {
  "userId": "58c0b6f8d88f5d05605df2a4",
  "WORLD": 2,
  "MODE": "normal",
  "TIME": 5,
  "LEVEL": 5,
  "when": "2017-03-15T19:10Z",
  "city": null,
  "country": "CO",
  "userName": "Miguel Correa",
  "externalIds": {
  "FB": "10153869775256849"
  },
  "rank": 1
  }
  ],
  "leaderboardShortCode": "NORMAL_LAST_LEVEL"
}


How can I configure the event and the leaderboard to get what I want?

Best Answer

Hi Miguel,


Have you considered partitioning your leaderboard based on World?


https://docs2.gamesparks.com/tutorials/social-features/partitioning-leaderboards.html


Let me know if this sounds like it could work,


-Pádraig

1 Comment

Answer

Hi Miguel,


Have you considered partitioning your leaderboard based on World?


https://docs2.gamesparks.com/tutorials/social-features/partitioning-leaderboards.html


Let me know if this sounds like it could work,


-Pádraig

Login to post a comment