Sign In Register

How can we help you today?

Start a new topic
Answered

Leaderboard GetLeaderboardEntriesRequest using a metric instead of player?

Our team would like to use a global leaderboard for matchmaking. In this case, we'd like to retrieve a group of entries around a given score calculated offline by game code. Is there anyway to do this given the current api? At the moment, I only see access to entries around a given player.


Best Answer

I tried implementing matchmaking for my current game with leaderboards and successful to some extent with GameSparks.


This is what I did.


1. In my game I created a Tracking_Leaderboard and Tracking_Event, which collects scores in the cloud code and not visible to players. 


2. What ever a event for scores of single player or challenge are posted to server, I will keep track these scores in the Tracking Leaderboard along with "GAME_COUNT", "CURRENT_TIME" attributes.


3. The data collected from step 2 is helpful in fetching which player is active recently and which rank he is in. And now when ever I need a random player for a current player, I will request the Tracking_leaderboard "AroundMeLeaderBoardRequest" and pick one from it to send as random player.


I need to work more on how i can make sure i wont pick the specific players all the times and distribute the frequency of picking uniformly.


This might not be a fair match making, but this can help in extending the current system. Any suggestions would be of great help and I hope this info might help in finding the possibilities.


If you know the rank of the given score, you can get leaderboard entries around it in javascript using Spark.getLeaderboards.


The is not a socket based api for this functionality right now.

Answer

I tried implementing matchmaking for my current game with leaderboards and successful to some extent with GameSparks.


This is what I did.


1. In my game I created a Tracking_Leaderboard and Tracking_Event, which collects scores in the cloud code and not visible to players. 


2. What ever a event for scores of single player or challenge are posted to server, I will keep track these scores in the Tracking Leaderboard along with "GAME_COUNT", "CURRENT_TIME" attributes.


3. The data collected from step 2 is helpful in fetching which player is active recently and which rank he is in. And now when ever I need a random player for a current player, I will request the Tracking_leaderboard "AroundMeLeaderBoardRequest" and pick one from it to send as random player.


I need to work more on how i can make sure i wont pick the specific players all the times and distribute the frequency of picking uniformly.


This might not be a fair match making, but this can help in extending the current system. Any suggestions would be of great help and I hope this info might help in finding the possibilities.

Login to post a comment