Android - OpenFeint - 允许更差的分数选项不起作用

发布于 2024-12-28 12:06:24 字数 1087 浏览 5 评论 0原文

我今天一直在实施 OpenFeint,一切都很顺利,直到我注意到我认为是一个错误。

我有一个排行榜设置,其中选中了“允许更差的分数”选项 - 因此用户上传的任何分数每次都应添加新分数。

目前,当我提交分数时,无论分数如何,用户分数始终会替换为新值,而不是创建新分数。

我在自己的代码以及他们提供的示例应用程序中尝试过这一点 - 两者都具有相同的结果,无论如何用户都只有一个分数。

我只是想确保我没有遗漏任何明显的东西 - 同时我已向他们的支持台提交了一张票并等待回复。

哦,这也不是一个“汇总”排行榜 - 我确实看到其他人也有类似的问题,他们就是这种情况。

代码:

    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);          
      }
    }); 

谢谢, 瑞奇

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

在你怀里撒娇 2025-01-04 12:06:24

还有另一个名为 Swarm 的 SDK,与 OpenFeint 类似。 Swarm 拥有排行榜,允许开发者在每个排行榜上为每个用户存储最多 25 个分数。这将使您能够允许不一定是用户最高分数的分数。我意识到这不是一个很好的解决方案,但它仍然可以让您实现您正在寻找的目标。

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.

花伊自在美 2025-01-04 12:06:24

好吧,我决定选择 Scoreloop - 纯粹是因为它的受欢迎程度。 Swarm 看起来是一个不错的选择,但它目前处于测试阶段,这让我有点担心。

对于任何想知道的人,OpenFeint 支持还没有回复我,在提到他们的支持不是最好的之前,我已经阅读了几篇文章。他们的网站昨天也充满了问题,所以我决定反对他们。遗憾的是,事情进展得相当顺利。

更新:我收到了回复,看来这是我的误解,也许他们的文档中存在一些差异:

感谢您就此问题与我们联系,对此我们深表歉意
困惑。 “允许更差的分数”复选框并不意味着
排行榜将记录给定用户的所有分数。它的意思是
玩家的分数将被记录到排行榜中,即使
这比他们之前记录的分数还要差。一个用户只能拥有
任何给定排行榜上的一个分数。我会确保我们的
有关此功能的文档包含此信息,以便
将来关于此功能的困惑将会减少。我
对于由此可能造成的任何困难,我们深表歉意。

所以,看起来你在排行榜上只有一个分数 - 这是有道理的。

除此之外,我仍然选择 Scoreloop,我可以确认这对于每个用户一个分数的行为是相同的,但它提供了更多的功能,并且似乎比 OpenFeint 为我做的响应要快得多。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文