有没有办法以编程方式重置排行榜? [英] Any way to programmatically reset leaderboards?

查看:187
本文介绍了有没有办法以编程方式重置排行榜?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我查看GKScore和GKLeaderboard的文档时,无法将玩家报告的分数重置为GameCenter中的特定排行榜。我对吗?

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) { ... }];

有什么想法吗?

推荐答案

你是对的。在实时应用程序中启动后,无法重置Game Center排行榜类别或删除类别。

You are correct. There is no way to reset a Game Center leaderboard category or to remove a category once it's been launched in a live app.

Apple确实允许重置成就的方法。

Apple did allow a way to reset an achievement.

我所知道的唯一解决办法就是只允许旧类别死掉,将它们放到底部,将与该类别相关的标签更改为高分(已存档)然后创建一个新的并将其标记为高分并将其排序到顶部。这会给你一个新鲜的。但是当然仍然有25个排行榜类别的限制 - 所以在某些时候你会沉没,除非你只是弄清楚如何重用旧的排行榜。 (例如,将所有得分x10设为一致,以便每个人都能快速超过旧得分)

The only work around that I know of is to just allow old categories to die, resort them to the bottom, change the label associated with the category to be something like "High Score (Archived)" and then create a new one and label it "High Score" and sort it to the top. This will give you a fresh one. But of course there is still a limit of 25 leaderboard categories - so at some point you're sunk unless you just figure out how to reuse old ones. (For example, make all your scores x10 so that everyone rises up above the old scores very quickly)

编辑...在最近的版本中,我确实重用了排行榜最近的应用更新中的类别。该类别的原始用途是相当低的分数......在低1000的分数。该类别的新用途将从10倍到1000倍不等。所以我知道该类别中的任何旧分数都会在游戏的前几场比赛中被删除。当然,类别ID不能更改(com.company.app.category),但描述(英语或其他)可以更改。它可能会变得令人困惑,因为你在为完全不同的东西保存分数时使用的是具有一个id的类别。但是使用#define kBlahBlahBlah来@com.company.app.blah你的代码可以使用任何名称来简化事情。希望有所帮助。

EDIT... In a recent version I actually did reuse a leaderboard category in a recent app update. The original use of the category was for scores that were fairly low... in the low 1000's. The new use of the category was going to be anywhere from 10x to 1000x that. So I knew that any old scores in that category would be erased within the first couple plays of the game. OF course the category id can't change (com.company.app.category), but the description (english or otherwise) can change. It can become confusing because you're using a category that has an id of one thing when saving scores for something totally different. But with #define kBlahBlahBlah to @"com.company.app.blah" you're code can use whatever name makes it easy to keep things straight. Hope that helps.

这篇关于有没有办法以编程方式重置排行榜?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆