通过游戏中心共享保存的游戏数据?

发布于 2024-10-21 18:02:28 字数 231 浏览 1 评论 0原文

我正在尝试确定游戏中心是否适合我。这是我的情况:

我正在构建一个应用程序,允许用户创建自己的音乐作品。我计划使作品可通过文本文件(可能是 xml 或 json 格式)导出和加载。我想让用户与朋友分享他们的作品。在我看来,Game Kit 是 iOS 的默认社交网络,所以它似乎值得一看。然而,游戏套件的社交方面似乎主要是为实时、同时玩而设计的。有没有办法通过游戏中心以非实时的方式与朋友分享数据?有没有办法向游戏中心联系人发送消息?

I'm trying to figure out if game center is the right tool for me. Here's my situation:

I'm building an app which allows users to create their own musical compositions. I plan to make the compositions exportable and loadable via text file (xml or json format, probably). I'd like to allow users to share their compositions with friends. It seems to me that game kit is the default social network for iOS, so it seems worth looking at. However, the social aspect of game kit seems to be designed mainly for real-time, simultaneous play. Is there any way to share data with friends in a non-realtime way via game center? Is there even a way to send game center contacts a message?

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

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

发布评论

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

评论(1

心房的律动 2024-10-28 18:02:28

如果您查看 GameKit 中的对等网络文档,您可能会准确地找到您正在寻找的内容,但有一个微小的例外。它仅适用于 wifi/蓝牙连接。

我对你的描述的看法是使用一个托管这些作品的私人服务器。如果您熟悉 Java 和/或 Python,我建议您使用 Google App Engine 作为服务器。这样头痛就会减轻一些。

您也可以使用 GameKit,但正如您所描述的,它更适合实时通信。
如果您实施邀请处理程序,您可以“邀请”其他玩家接收该作品,但如果他们拒绝,您将不得不稍后手动重试。

您通过开放的“GameKit 连接”发送的内容可以是您喜欢的“任何内容”,填充到 NSData 对象中,因此没有任何限制。

我希望这可以帮助您朝着正确的方向前进,祝您好运!

If you look at the documentation for peer-to-peer networking in GameKit, you will probably find exactly what you are looking for, with a tiny exception. It is only for wifi/bluetooth connectivity.

The way I would go with your description is a private server that hosts the compositions. If you are familiar to Java and/or Python, I'd recommend using Google App Engine for the server. That would make the headache a little bit less.

You can use GameKit too, but as you describe it, it's more for real-time communication.
If you implement invitation handlers, you could "invite" another player to receive the composition, but if they reject you will have to retry manually at a later point.

The contents of what you sent over an open "GameKit connection" can be "anything" you like, stuffed into a NSData object, so there is no limits there.

I hope this helps you a tiny bit in the right direction, good luck!

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