Leaderboard with usernames vs displaynames

+1 vote
Hello, I am using the userbase in which players have unique usernames that is made of random string and their First name is the actual dispay name. However, I noticed in scoreboard that it takes username to store the score for. Is there a way with one query I can get the first name of the username with highest score? Any suggestions? I cant store score against display name, because the display name might be duplicate Thanks
asked Jul 17, 2016 in Unity by AndroidFolk (107 points)

1 Answer

0 votes

Hi AndroidFolk,

 

Yes, you can easily resolve this by saving the score of user with unique name which you are creating ( unique usernames that is made of random string). However about display name, you can save into No-SQL Storage service along with the save user score method and you can fetch that information easily along with getTopNRankers call.  

Please have  a look into it and let me know if it helps. 

 

Regards,

Himanshu Sharma

answered Jul 18, 2016 by hs00105 (2,005 points)
In your link:

String key1 = "name";     
String value1 = "John";
Query query = QueryBuilder.build(key1, value1, Operator.EQUALS);

This example only shows how to fetch one specific information. How about fetching all the "Additional Data" of for example all top 100 users?
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...