Frage

I've been implementing OpenFeint today and everything was going well until I noticed what I think is a bug.

I have a leaderboard setup with the option "Allow worse scores" checked - so any score the user uploads should add a new score each time.

Currently when I submit a score, regardless of the score, the users score is always replaced with the new value instead of creating a new score.

I've tried this in my own code and also the sample app they provide - both with the same results, the user just having one score regardless.

I just want to make sure I'm not missing anything obvious - in the mean time I have submitted a ticket to their support desk and awaiting a reply.

Oh, and it's not an 'aggregate' leaderboard either - I did see someone else having a similar problem and this was the case for them.

Code:

    long scoreValue = 1234; // or whatever score
    Score s = new Score(scoreValue, null); // Second parameter is null to indicate that custom display text is not used.
    Leaderboard l = new Leaderboard(getString(R.string.leaderboard_id));
    s.submitTo(l, new Score.SubmitToCB() {
      @Override public void onSuccess(boolean newHighScore) {           
        GameModeBase.this.setResult(Activity.RESULT_OK);         
      }
      @Override public void onFailure(String exceptionMessage) {
        Toast.makeText(GameModeBase.this, "Error (" + exceptionMessage + ") posting score.", Toast.LENGTH_SHORT).show();
        GameModeBase.this.setResult(Activity.RESULT_CANCELED);          
      }
    }); 

Thanks, Ricky

War es hilfreich?

Lösung 2

Well I've decided to go for Scoreloop - purely on the popularity of it. Swarm looks a good option but it's currently in beta and that worries me a little.

For anyone wondering, OpenFeint support haven't got back to me and I've read several posts before mentioning their support isn't the best. Their website was littered with issues yesterday too so I've decided against them. Pity really, it was going quite well.

Update: I got a reply and it seems it's a misunderstanding on my part and perhaps some discrepancies in their documentation:

Thank you for contacting us about this issue, and I apologize for the confusion. The 'Allow worse scores' checkbox does not mean that the leaderboard will record all scores from a given user. What it means is that the player's score will be recorded into the leaderboard, even if it is worse than their previously recorded score. A user can only have one score on any given leaderboard. I will make sure that our documentation about this feature includes this information so that there will be less confusion about this feature in the future. I apologize for any difficulties that this may have caused.

So, it looks like you only ever have one score in the leaderboard - makes sense.

Further to this, I'm still opting for Scoreloop and I can confirm this behaves the same regarding one score per user but it offers a lot more functionality and does seem to respond much quicker than OpenFeint did for me.

Andere Tipps

There's another SDK called Swarm that's similar to OpenFeint. Swarm has leaderboards that allows developers to store up to 25 scores per user per leaderboard. This would enable you to allow scores that aren't necessarily the user's top score. I realize this isn't a great solution, but it might still allow you to accomplish what you're looking for.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top