leaderboard

Unity - Firebase realtime database - Get my rank in leaderboard

我是研究僧i 提交于 2019-12-02 14:37:53
问题 I have a mini-game with a leaderboard using firebase database realtime. After I got list of user-score from firebase, I would like to get the score of the current user who was out of the list. It's easy to get the score of the current user but how to know the rank in list which was OrderByChild("score"). This is the code to get the leaderboard. List<UserScore> leaderBoard = new List<UserScore>(); FirebaseDatabase.DefaultInstance .GetReference("user-scores") .OrderByChild("score") .LimitToLast

Unity - Firebase realtime database - Get my rank in leaderboard

强颜欢笑 提交于 2019-12-02 08:53:39
I have a mini-game with a leaderboard using firebase database realtime. After I got list of user-score from firebase, I would like to get the score of the current user who was out of the list. It's easy to get the score of the current user but how to know the rank in list which was OrderByChild("score"). This is the code to get the leaderboard. List<UserScore> leaderBoard = new List<UserScore>(); FirebaseDatabase.DefaultInstance .GetReference("user-scores") .OrderByChild("score") .LimitToLast(10) .GetValueAsync() .ContinueWith(task => { if (task.IsFaulted) { Debug.Log("Fail To Load"); } else

MySQL Get Rank from Leaderboards

烂漫一生 提交于 2019-12-02 08:32:52
I am implementing leaderboards in a game based on very good tutorial. http://gamedevelopment.tutsplus.com/tutorials/how-to-code-a-self-hosted-phpsql-leaderboard-for-your-game--gamedev-11627 I am quite new to MySQL, but I got some basics. But there is a part of the code which I am totally clueless how actually works and because I don't want to implement something which doesn't make any sense to me I wanted to ask if someone could please help me understand this. It handles returning player's rank in the leaderboards: SELECT uo.*, ( SELECT COUNT(*) FROM Scores ui WHERE (ui.score, -ui.ts) >= (uo

Creating a leaderboard for offline game in Python

半城伤御伤魂 提交于 2019-12-02 07:17:10
For a school project, I'm creating a game that has a score system, and I would like to create some sort of leaderboard. Once finished, the teachers will upload it to a shared server where other students can download a copy of the game, but unfortunately students can't save to that server; if we could, leaderboards would be a piece of cake. There would at most be a few hundred scores to keep track of, and all the computers have access to the internet. I don't know much about servers or hosting, and I don't know java, html, or any other language commonly used in web development, so other related

Google Play Leaderboard not showing up after posting score to leaderboard in Unity3d

南笙酒味 提交于 2019-12-01 08:31:51
I have enabled google play games plugin in my Unity Project. The Unity version is 5.3.4f1. The google play games plugin version is 0.9.32. I have successfully logged in to the google play games service in my project. After submitting the score,and when I try to view the leaderboard, its showing an error like this in the log: 04-29 09:58:53.537: I/Unity(6910): [Play Games Plugin DLL] 04/29/16 9:58:53 +05:30 DEBUG: Entering internal callback for AndroidPlatformConfiguration#InternalIntentHandler 04-29 09:58:53.537: I/Unity(6910): (Filename: ./artifacts/generated/common/runtime

Google Play Leaderboard not showing up after posting score to leaderboard in Unity3d

a 夏天 提交于 2019-12-01 06:16:03
问题 I have enabled google play games plugin in my Unity Project. The Unity version is 5.3.4f1. The google play games plugin version is 0.9.32. I have successfully logged in to the google play games service in my project. After submitting the score,and when I try to view the leaderboard, its showing an error like this in the log: 04-29 09:58:53.537: I/Unity(6910): [Play Games Plugin DLL] 04/29/16 9:58:53 +05:30 DEBUG: Entering internal callback for AndroidPlatformConfiguration

How to get rank from Google Play game service's leaderboard?

眉间皱痕 提交于 2019-11-29 17:12:05
I'm working on a big application and I have to take the player's rank from the Google Play services' leaderboard. The leaderboard works well. I've already found the right method but I don't know how I'm supposed to use it: private void loadRankOfLeaderBoard() { Games.Leaderboards.loadCurrentPlayerLeaderboardScore(mGoogleApiClient, getResources().getString(R.string.leaderboard_leaderboard), LeaderboardVariant.TIME_SPAN_ALL_TIME, LeaderboardVariant.COLLECTION_PUBLIC).setResultCallback(new ResultCallback<Leaderboards.LoadPlayerScoreResult>() { @Override public void onResult(final Leaderboards

Is it possible to have a Game Center “LowestScore” Leaderboard?

一笑奈何 提交于 2019-11-29 14:32:16
I've read that Game Center Leaderboard scores are only updated when the newly posted score is greater than the already existing score. This made me wonder if it is possible at all to have a Game Center Leaderboard that stores scores counting down, for example "time to complete level". Can this still be achieved with the correct setup of the Leaderboard, for example with sorting and formatting modifiers? And just to confirm, is it really not possible to have a Game Center Leaderboard simply accept the value that you send to it, regardless of whether it is greater or smaller? You can choose low

Android games leaderboard broken while testing

时光总嘲笑我的痴心妄想 提交于 2019-11-29 12:26:14
I have successfully integrated the Google Games API in my app, and now I can see my leaderboard and achievements as described here and here respectively. However, when trying to submit a score using this code: Games.Leaderboards.submitScore(mGoogleApiClient, getString(R.string.play_console_leaderboard_id), 100); for some reason the leaderboard stops appearing. Actually it starts loading, and then directly disappears. This post seems to describe the same issue, however there is no solution posted. I know that it has to do with the submitScore because when I create a new leaderboard, I can

Top 5 scores from google leaderboard

时光总嘲笑我的痴心妄想 提交于 2019-11-28 22:07:25
My requirement is to get top 5 scores from leaderboard and display it in my app. There is a method loadTopScores but it shows the scores in its own UI i guess. mGamesClint.loadTopScores(new OnLeaderboardScoresLoadedListener() { public void onLeaderboardScoresLoaded(int arg0, LeaderboardBuffer arg1, LeaderboardScoreBuffer arg2) { // TODO Auto-generated method stub } }, LEADERBOARD_ID,LeaderboardVariant.TIME_SPAN_ALL_TIME , LeaderboardVariant.COLLECTION_PUBLIC, 5, true); So is there any way I can get individual data like Name and score..? Name 1 : Name of the top scorer 1 score 1 : score of the