如果 iPhone 上支持 Game Center,如何构建仅支持 Game Center 的游戏?
我即将开始构建一款使用 Game Center 成就和高分的 iPhone 游戏,但我也希望有一个可以在没有 Game Center 的 iPhone 上运行的版本(即 iOS 版本 < 4.1) )。我可以在应用程序商店中拥有同一应用程序的两个版本吗?一个用于游戏中心,一个不用于游戏中心?或者我应该设计应用程序,使得如果iPhone没有游戏中心,它就不会使用它,如果有,它就会使用它?
我将继续研究这个问题,只是想我会发布这个问题并同时得到一些反馈。非常感谢!
I'm about to begin building an iPhone game that will make use of Game Center Achievements and high scores, but I'd also like to have a version that works on iPhones that don't have Game Center (i.e. iOS version < 4.1). Can I have two versions of the same app in the app store, one for game center, one for without? Or should I design the app such that if the iPhone doesn't have Game Center, it won't make use of it, and if it does, it will make use of it?
I'm going to continue researching this, just thought I'd post this question and get some feedback in the meantime. Thanks so much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我也在做同样的事情。如果您有 GameCenter 功能,则可以使用这些功能。如果你不这样做,你就不能。
我不会在没有它的情况下编写游戏,然后再添加它。就我而言,我为非 GC 用户禁用多人游戏。
此外,如果设备具有 GC 功能,您可能希望游戏能够正常运行,但用户当前无法(无论出于何种原因)连接到 GC。
I am doing the same thing. If you have GameCenter capabilities, you can use the features. If you don't, you can't.
I would not program a game without and then add it later. In my case I disable Multiplayer for non-GC users.
Also, you may want your game to work if the device has GC capabilities, but the user cannot, for whatever reason, connect to GC currently.
您可以使用以下函数来检测设备是否支持Game Center:
但是我发现很多人没有更新到iOS 4.1或者对Game Center很幼稚。尽管下载量很大,但我的游戏用户数量却很少。我实际上正在考虑转向 Open Feint,它比 Game Kit 更容易实现,并且还支持旧设备。
You can use the following function to detect if the device supports Game Center:
However I found that a lot of people have not updated to iOS 4.1 or are naive about Game Center. The number of users in my game is quite small even though there are so many downloads. I was actually considering moving over to Open Feint which is very much easier to implement than Game Kit and also supports older devices.
这是我从一位苹果工程师那里收到的明确答复……
“我们建议制作一个版本的应用程序,它可以动态检测 Game Center 是否可用,并据此使用(或不使用)它。”
Here's the definitive response I received from one of the Apple engineers...
"We'd recommend making one version of the app which dynamically detects whether Game Center is available and uses it (or not) based on that."
也许创建一个没有它的游戏,然后创建游戏中心的功能,但禁用它们,并且只有在它们具有正确的版本时才启用它们。
Maybe create a game without it, then create the capabilities for the game center, but disable them, and only enable them if they have the right version.