EzDevInfo.com

leaderboard

Leaderboards backed by Redis in Ruby leaderboard | RubyGems.org | your community gem host

Any way to programmatically reset leaderboards?

As I look into documentation of GKScore and GKLeaderboard, there is no way to reset scores reported by player to particular leaderboard in GameCenter. Am I right?

This seems quite inconsistent, since it is possible to reset achievements:

[GKAchievement resetAchievementsWithCompletionHandler:^(NSError *error) { ... }];

Any thoughts?


Source: (StackOverflow)

Publish Android App with leaderboards and no achievements

I have got my leaderboards integrated into my android app, but don't plan on adding achievements. I have completed the Game Services setup in the Developer console on Google Play, all apart from the achievements. When I go to the Publish section it says my achievements are missing. Is it possible to publish it without achievements?


Source: (StackOverflow)

Advertisements

Android Game API: Leaderboard - Get specific player score? [closed]

SOLVED

I have a quick question that I cant find a specific solution. The problem is that I have a Leaderboard using GooglePlay API. What I want to do is actually get what is the player score for an individual and specific player.

For example I want to display the score he has in the leaderboard on a String on my activity (not LeaderboardActivity), or put it on top left corner of my game.

How can I do this?

Thanks!


Source: (StackOverflow)

List all the leaderboards in Google play game services

In the documentation the code snippet to display leaderboard is

startActivityForResult(Games.Leaderboards.getLeaderboardIntent(getApiClient(), LEADERBOARD_ID), REQUEST_LEADERBOARD);

This goes into the given leaderboard with LEADERBOARD_ID

My game has severel leaderboards and what I want to do is display a list of them so that user can select a specific leaderboard.

Is it possible to do that?


Source: (StackOverflow)

Implementing a Leaderboard

Users on my site create annotations for rap lyrics (example). I want to create a leaderboard to reward the people who create the most annotations.

The leaderboard should track how many annotations each user has created overall, as well as how many he has created in the past week, day, etc.

I have no problem implementing the overall leaderboard:

@users = User.all

<table>
  <tr>
    <th>Contributor</th>
    <th>Annotations</th>
  </tr>
    <% @users.sort_by{|u| u.annotations.size }.reverse.each do |u| %>
      <tr>
        <td><%= u %></td>
        <td><%= u.annotations.size %></td>
      </tr>
    <% end %>
</table>

But when I try to implement (say) the daily scoreboard, I'm repeating code and the operation is painfully slow (because it has to iterate through every annotation in memory rather than relying on database sorting / counting):

<table>
  <tr>
    <th>Contributor</th>
    <th>Annotations</th>
  </tr>
    <% @users.sort_by{|u| u.annotations.select{|a| a.created_at > 1.day.ago }.size }.reverse.each do |u| %>
      <tr>
        <td><%= u %></td>
        <td><%= u.annotations.select{|a| a.created_at > 1.day.ago }.size %></td>
      </tr>
    <% end %>
</table>

What's the best way to implement a daily / weekly scoreboard?


Source: (StackOverflow)

Top 5 scores from google leaderboard

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 top scorer 1

Name 2 : Name of the top scorer 2 score 2 : score of the top scorer 2

......and so on

I just want name string and score integer so that I can use it in my game.

Please suggest me some ideas


Source: (StackOverflow)

Centralized leaderboard for Android

Does Android provide a centralized leaderboard feature like Apple's Game Center leaderboard? (so that there is no need to use 3rd party services like OpenFeint)


Source: (StackOverflow)

Launch Count on iPhone App

Ok I want to keep track of how many times my iPhone App has been launched. I will be using this number for a "leader board" for our most active user. I figured the code needs to be in the -DidBecomeActive method being that in iOS4 the app may remain in the background for sometime.

Now I know it's probably trivial and i'm just making it more difficult than necessary but I can't for the life of me figure out how to do this! Just want the launch number to increase by 1 every time the app is launched or returned from the background.

Any help is greatly appreciated.


Source: (StackOverflow)

GKLeaderboard's timeScope does nothing?

I am trying to make a leaderboard using GameCenter on iOS7 that shows only scores submitted in the last week.

I am aware that with iOS7 the use of timescope when opening the gamecenter view controller has been deprecated, but every post I find on this suggests building a leaderboard within the game to get around this.

We have our own leaderboards implemented in game which we fetch using loadScoresWithCompletionHandler, but the timeScope settings still does not appear to work. What ever I set it to, I receive the best score of all time for the user, not the best sore in the last day / week.

Has anyone else found this or does it work for everyone else? I confirm the score is wrong be looking at the "date" on any received GKScores.

The code in question is below:

const char* szName("LeaderboardName_Week1");
NSString* pxLeaderboardName = [NSString stringWithUTF8String:szName];
GKLeaderboardTimeScope eTimeScope = GKLeaderboardTimeScopeWeek;
GKLeaderboard* leaderboardViewer = [[[GKLeaderboard alloc] init] autorelease];
if (leaderboardViewer)
{
    [leaderboardViewer setIdentifier: pxLeaderboardName];
    [leaderboardViewer setTimeScope: eTimeScope];
    [leaderboardViewer setRange: NSMakeRange(1, 100)];
    [leaderboardViewer setPlayerScope: (bFriendsOnly)?GKLeaderboardPlayerScopeFriendsOnly:GKLeaderboardPlayerScopeGlobal];

    [leaderboardViewer loadScoresWithCompletionHandler:^(NSArray* scores, NSError* error)
     {
         if (error || !scores)
         {
             NSLog(@"GameKit Score retrieval Error:\n%@", error);
         }
         else
         {
             NSLog(@"GameKit Score retrieval complete, %d scores. Retrieving player names.", (u_int)scores.count);

             GKScore* playerScore = leaderboardViewer.localPlayerScore;

             u_int uIndex2;
             for (uIndex2 = 0; uIndex2 < scores.count; ++uIndex2)
             {
                 GKScore* score = [scores objectAtIndex:uIndex2];

                 //score.date is out of the requested range at this point.
                 xEntry.m_uRank = static_cast<u_int> (score.rank);
                 xEntry.m_lScore = score.value;
                 xEntry.m_uContext = score.context;
             }
        }
    }];
}

I am doing all this in the sand box. Any help appreciated!


Source: (StackOverflow)

MySQL: Querying a leaderboard with ties

I know this is a popular topic, but I still haven't found quite what I'm looking for. I'd like to query one table

BOOKS_READ
id
user_id
book_id

to format a leaderboard of users who have listed the most books as having been read. When a user reads a book, a record matching the book id and the user id gets logged into the books_read table.

Is it possible to rank the results of this query, starting at 1, and with consideration of ties?

SELECT user_id, COUNT(*) AS book_count 
FROM books_read 
GROUP BY user_id 
ORDER BY book_count DESC LIMIT 10

In the event of a tie, I would like to list an '=' sign in the results.

For example,

rank  user_id  book_count  
=1    30       121
=1    17       121
 2    101      119
=3    11       104
=3    91       104

Many thanks for any help! I don't mind using PHP to handle some of it, but I'm very interested in learning straight SQL solutions to these kinds of things :-)


Source: (StackOverflow)

Leaderboards based on facebook

I am working on developing a game on iOS platform, integrated with Facebook.

I searched google and found a lot of different, confusing and outdated tutorials. That's why I decided to ask here.

I would like to show player actual ranks and player results compared to friends scores. I need to keep scores for whole game and for each level separately.

I got familiar with scores connection and Open Graph Objects, however I didn't try to implement anything yet. Before I start I would like to be sure what is the best solution, and what will it take to do that. My app is going to be iOS only and I would like to avoid creating Web application.

  • Can I use scores connection on iOS application to store whole game result? Was it possible recently or was it always possible?
  • Is Open Graph Object a good solution to store player best result for each level?
  • Is it possible to set, get and change custom object in Open Graph?
  • Can I define Graph Object in simple page located on server without Facebook app configuration?
  • Do I have to create Web applications to achieve my goal?
  • Is it better to get list of friends from facebook and store points on my own serwer?

Source: (StackOverflow)

How to delete a hacked score from Google Play Game Services leaderboard?

I have a leaderboard with tamper protection ON since it's creation, but a player has added a hacked score of some millions of points (human reachable max of points is less than 1000)

How can I delete only that hacked score? It must be a way to do it... but can't find in documentation: https://developers.google.com/games/services/common/concepts/leaderboards


Source: (StackOverflow)

Can I have android games using the same leaderboards and achievements in google play games

I have two games free one (with ads) and paid.

On iOS they share leader boards and achievements that are in one group.

Is it possible to have single leader board for those two apps in Google Play Games service to share. Shall I link to signle GPG profile those two apps? They are both on the same platform (and have two different names xxx and xxx free)?


Source: (StackOverflow)

How to cap a leaderboard in Redis to only N elements?

I need to create a leaderboard with maximum number of elements, say N ? I know how to use LPUSH + LTRIM to cap a list size to N elements. How to implement this for leaderboard using a Redis sortedset

So far my approach is to do this in 3 steps: a) ZADD to add a score+ item to the leaderboard

b) find the rank of the Nth element (I am not sure how to do this)

c) do a ZREMRANGEBYRANK leaderboard 0 rank_of_the_nth_element.

Is there a better way ?


Source: (StackOverflow)

Can Aerospike's Large Ordered List match the Sorted Sets of Redis for Leaderboards?

I'm considering replacing Redis with Aerospike and I wanted to know if aerospike is capable of delivering the same capabilities and performance as Redis's sorted sets for Leaderboards within an application. I need to be able to quickly insert, read and update items in the set. I also need to be able to do range queries on them and retrieve the rank of an arbitary item in the set quickly.


Source: (StackOverflow)