iPhone - 使用游戏中心的在线多人游戏教程

发布于 2025-01-08 18:40:54 字数 569 浏览 0 评论 0原文

我正在尝试实现游戏中心来在我的应用程序中进行在线多人游戏,但是阅读Apple文档就像蒙着眼睛试图破译在火星巨石上发现的外星人铭文一样。我已经尝试过 Ray Wenderlichs 的这些教程 第 1 部分第 2 部分< /a>,但它们不起作用(比赛永远不会开始,因为邀请设备从未收到比赛接受)。

有没有像我们教 5 岁孩子那样的教程来教授这个?这样做,再这样做,再这样做,不需要显通才能明白吗?

请不要提及 Apple 的任何教程、示例或文档(否则我会崩溃)。苹果在创造令人惊叹的设备方面非常出色,但他们所有的文档都令人厌恶。谢谢。

I am trying to implement game center to do an online multiplayer in my app, but reading Apple docs is like trying to decipher an alien inscription found on a monolith in mars, blindfolded. I have tried these tutorials by Ray Wenderlichs Part 1 and part 2, but they are not working (match never starts because inviting device never receives the match acceptance).

Is there any tutorial created to teach this as we would do to teach a 5 y.o. children? Do this, then do this, then do this and not require exoteric powers to understand?

Please don't mention any tutorial, sample or doc from Apple (or I will snap). Apple is great for creating amazing devices, but all their docs stink infinity squared. thanks.

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

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

发布评论

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

评论(1

女中豪杰 2025-01-15 18:40:54

事实上,我认为苹果的文档非常精彩。请不要啪啪啪。 :)

但他们不会为您提供详细的、逐步的、掌握的建议,原因是:这种详细程度容易频繁更改,并且取决于许多因素(即设备、操作系统版本、SDK 版本、蓝牙、Wifi、3G 等)几乎可以保证您的体验会有所不同。当一个乐于助人的开发人员编写教程时,当然也会出现同样的问题。意思是:描述越详细,对更多人来说失败的可能性就越大,文章越旧,失败的可能性就越大。

无论如何,通常如果其他设备没有响应,通常有与代码没有直接关系的简单原因。从我的脑海中,这些都是我以前遇到过的问题:

  • 为每台设备使用唯一的 Game Center 帐户
  • 确保您的 Game Center 帐户处于沙盒模式
  • 确保您的应用程序标识符已在 Game Center 中注册
  • 确保您运行两台设备上的相同代码(即不是两个不同的项目,可能使用不同的代码)
  • 确保两台设备都可以连接到互联网(不仅仅是本地 Wifi 网络)
  • 确保本地播放器在继续之前经过身份验证(记录此信息

)可能有十几个或更多此类问题。我很确定雷的教程总体上有效。您几乎找不到任何其他教程比他的更具描述性。

Actually, I think Apple's docs are quite wonderful. Please don't snap. :)

But they won't give you detailed, step-by-step, handholding advice for a reason: this level of detail is prone to frequent changes, and depends on a number of factors (ie device, OS version, SDK version, bluetooth, Wifi, 3G, etc.) that it is almost guaranteed that your experience will vary. The same problem of course arises when a helpful developer writes a tutorial. Meaning: the more detailed the description the more likely it'll fail for a greater number of people, more so the older the article is.

Anyhow, usually if the other device doesn't respond there are often simple reasons that aren't directly related to the code. From the top of my head these are all issues I've ran into before:

  • use a unique Game Center account for every device
  • make sure your Game Center accounts are in sandbox mode
  • make sure your app identifier is registered in Game Center
  • make sure you run the same code on both devices (ie not two different projects, possibly using different code)
  • make sure both devices can connect to the Internet (not just to your local Wifi network)
  • make sure the local player is authenticated before proceeding (log this)

There's probably a dozen or more of these kinds of issues. I'm pretty sure Ray's tutorial works in general. And you'll hardly find any other tutorials more descriptive than his.

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