简体   繁体   English

Android的新Google Play游戏服务排行榜API

[英]Android's new Google Play Game Services leaderboard API

With the release of Android's new Google Play Game Services the other day, I wanted to implement the leaderboard they had. 随着Android新版Google Play Game Services的发布,我想实现他们拥有的排行榜。 After reading here , am I reading it correctly that it is not possible to let the user submit multiples scores to one leaderboard? 这里阅读之后,我是否正确地阅读了它是不可能让用户将多个分数提交到一个排行榜? It seems so from reading but that is disappointing if that is true. 从阅读看来似乎如此,但如果这是真的那就令人失望。 I am hoping I am just reading it incorrectly or there is another link somewhere that lets me implement what I need! 我希望我只是错误地阅读它或者在某个地方有另一个链接让我实现我需要的东西!

My question is if there is a way to use Android's new Game Services leaderobard where the user can submit multiples scores to 1 leaderboard and not just have the leaderboard store the highest score the user has gotten. 我的问题是,如果有一种方法可以使用Android的新Game Services leaderobard,用户可以将多个分数提交到1个排行榜,而不只是让排行榜存储用户获得的最高分。

There is no point submitting multiple scores to a leaderboard. 没有必要向排行榜提交多个分数。

This is what the documentation says 这就是文档所说的

The game services checks if this score is better than the player's current leaderboard entry for the daily, weekly, or all-time score. 游戏服务会检查此分数是否优于玩家当前排行榜的每日,每周或所有时间分数。 If it is, the game services updates the corresponding leaderboards with the new score. 如果是,则游戏服务使用新分数更新相应的排行榜。

Why do you want to submit multiple scores to one leaderboard ? 为什么要将多个分数提交到一个排行榜?

If you have different levels you can create different leaderboards for that. 如果您有不同的级别,您可以为此创建不同的排行榜

Games can have multiple leaderboards, up to a maximum of 100. For example, a multi-level game might provide a different leaderboard for each level, and a racing game might have a separate leaderboard for each track. 游戏可以有多个排行榜,最多可达100个。例如,多级游戏可能为每个级别提供不同的排行榜,而赛车游戏可能为每个曲目设置单独的排行榜。

Solution for your Comment 您的评论的解决方案

The game services sends a score report back to the game client. 游戏服务将得分报告发送回游戏客户端。 This report tells the client whether this is a new daily, weekly, or all-time high score. 此报告告诉客户这是一个新的每日,每周或所有时间的高分。 If it isn't, the game services will tell the client what the current daily, weekly, or all-time high score is for this player. 如果不是,游戏服务将告诉客户当前每日,每周或所有时间的高分为该玩家。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM