GameCenter - 考虑应用内购买

发布于 2024-09-26 20:29:56 字数 505 浏览 3 评论 0原文

在我看来,Apple 似乎有点急于推出 GameCenter。也许我忽略了一些事情。

如果您创建的游戏想要提供应用内购买(假设您想要出售额外的地图或附加组件),是否有任何方法可以使用 GKMatchRequest 匹配共享相同地图(复数)的玩家?即其应用内购买重叠,但不完全相同。

或者也许您想在赛车游戏中出售汽车。如何匹配共享部分汽车(不一定是全部汽车)的玩家?我认为您不能,因为 GKMatchRequest 中的playerGroup 属性仅在用户属于同一组时才进行比较。

因此,如果一个用户购买了地图 A 和地图 B,而另一用户购买了地图 B 和地图 C,则无法将它们匹配,尽管他们可以一起玩地图 B。当然,您可以实现您的界面,以便用户必须指定他们想要玩的地图。但在其他情况下,应用内购买可能不是一个非此即彼的问题,而是可能会合并到游戏中(例如,如果您可以在战斗游戏中购买不同的士兵类型,然后匹配共享某些士兵的玩家)类型...在游戏本身中,您可以实现逻辑来排除玩家不共享的那些类型)。

任何人都可以想出一个有效的解决方案吗?

It looks to me like Apple was in a bit of a hurry to implement GameCenter. Maybe I am overlooking something.

If you create a game where you want to offer in-app purchases (say you want to sell additional maps or add ons), is there any way at all to match players who share the same maps (plural) using GKMatchRequest? i.e. whose in-app purchases overlap, but are not the exact same.

Or maybe you want to sell cars in a race game. How can you match players who share some of their cars, not necessarily all of them? I think you can't, because the playerGroup property in a GKMatchRequest compares only if users belong to the same group.

So if one user buys map A and map B and another user buys map B and map C, there is no way to match them, although they could be playing map B together. Of course you could implement your interface so that users have to specify which map they want to play on. But there are other scenarios where an in-app purchase might not be an either/or question, but might be combined in a game (e.g. if you can buy different soldier types in a battle game and then match players who share some of their soldier types... in the game itself you could then implement logic to exclude those types the players do not share).

Can anyone think of a solution that works?

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

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

发布评论

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

评论(3

梦途 2024-10-03 20:29:56

在地图案例中,我认为您需要让用户首先选择地图。否则,假设您匹配两个玩家,并且他们有共同的地图 B、C 和 E。现在你需要一种方法让他们就玩什么地图达成一致。也许玩家 1 打算玩地图 B,而玩家 2 想要玩地图 E。即使他们共享一个子集,现在您也必须完成本来可以在匹配过程中完成的工作。

就汽车而言,我认为您需要问为什么要以这种方式比较玩家。如果这只是出于公平性(因此您不会将拥有强大汽车的人与新手进行匹配),那么您可以根据最高汽车速度创建一个“级别”。也许你会给人匹配不同组的车,但他们可以均匀匹配。

最后,如果玩家绝对需要匹配的东西,请尽力使用之前的建议,如果不需要,则弹出一条消息说:“嘿,您没有任何匹配的汽车。想要购买这个可以一起玩吗?”提出立即购买或寻找其他玩家。您可以通过这种方式进行一些销售。


PS:抱歉说教了,但说苹果做得半途而废是不公平的。 Game Center 是一个必须扩展到数百万用户的系统,这些用户希望或多或少地立即找到匹配项。尝试通过重叠子集进行匹配会显着增加系统的复杂性,而且我认为您不会意识到这种设计的成本。

不能完全满足你的需要是很糟糕的,但认为缺点是由于无能是一种糟糕的态度。

In the map case, I think you would need to let the user choose the map first. Otherwise, say you match two players and they have maps B, C, and E in common. Now you need a way for them to agree on what map to play on. Maybe player 1 intended to play map B and player 2 wanted map E. Even if they share a subset, now you have to do the work that could have been done in the matching process.

In the cars case, I think you need to ask why you want to compare players this way. If it is simply out of fairness (so you don't match someone with powerful cars against a newbie) then you can create a "level" based on top car speed. Maybe you will match people with different sets of cars, but they can be evenly matched.

Finally, if the players absolutely need to have a matching thing, make a best effort using the previous suggestion, and if they don't, pop up a message saying, "Hey, you don't have any matching cars. Want to buy this one so you can play together?" Offer to buy it now or find another player. You might make some sales this way.


P.S. Sorry to be preachy, but it's not fair to say Apple did a half-a***d job. Game Center is a system that must scale up to millions of users, who want to find matches more or less instantly. Attempting to match by overlapping subsets would add a significant amount of complexity to the system, and I don't think you are appreciating the cost of such a design.

It sucks that can't do exactly what you need, but it's a poor attitude to assume the shortcomings are due to incompetence.

失去的东西太少 2024-10-03 20:29:56

这是支持应用内购买和游戏中心的另一个困境(请在评论中回复)。

假设我的游戏包含十个单独拼图包的应用内购买,并且我的游戏还包含使用 Game Center 的免费多人游戏模式。任何时候,单个 iOS 设备都会登录一个 iTunes 商店帐户,该帐户用于确定我的应用程序的所有应用内购买的状态。如果用户在单个设备上注销其 iTunes 商店帐户,并且新用户在同一设备上登录其 iTunes 商店帐户(使用设置应用程序中的“商店”选项卡),则应用内购买的状态为我的应用程序将为新登录的 iTunes 商店用户进行更新。完美的!现在,如果我的应用程序使用 Game Center 来允许不同的用户使用同一应用程序,会发生什么情况?似乎突然间您的一个应用程序拥有两种不同类型的用户帐户。一个 Game Center 帐户和一个 iTunes 商店帐户,对吗?例如,如果 user1 使用 Game Center 登录我的应用程序并购买了三个拼图包,那么这些拼图包将记入设备上当前登录的任何 iTunes 帐户。如果用户1退出Game Center,用户2登录Game Center,那么当前登录的iTunes帐户是否保持不变,意味着用户2可以访问用户1购买的拼图包?这是否也意味着 user2 可以在 user1 使用的同一 iTunes 帐户下购买额外的拼图包?

更糟糕的是,如果我想基于完成购买的拼图包来创建 Game Center 成就该怎么办?突然间,不同的 Game Center 用户会收到他们未解决的谜题包的成就,因为他们共享相同的谜题包状态,对吧?

Here's another dilemma with supporting both In-app purchases and Game Center (please respond in the comments).

Say my game includes in-app purchases for ten individual puzzle packs and my game also includes a free multiplayer mode using Game Center. At any time, a single iOS device has an iTunes store account logged in and this is the account that is used for determining the status of all in-app purchases for my app. If a user logs out of their iTunes store account on a single device and a new user logs into their iTunes store account on the same device (using the "Store" tab in the settings application), then the status of in-app purchases for my app will be updated for the newly logged in iTunes store user. Perfect! Now what happens if my app uses Game Center to allow different users to use the same app? It seems suddenly you have two different types of user accounts for a single app. One account for Game Center and one account for the iTunes store, correct? For exmaple, if user1 logged into my app using Game Center and bought three puzzle packs, then those puzzle packs would be charged to whatever iTunes account is currently logged in on the device. If user1 logs out of Game Center and user2 logs into Game Center, won't the iTunes account that is currently logged in remain the same, meaning user2 will have access to the puzzle packs bought by user 1? Doesn't that also mean user2 can purchase additional puzzle packs under the same iTunes account that user1 used?

Even worse, what if I want to create Game Center achievements based on completing a purchased puzzle pack? Suddenly, different Game Center users would receive the achievements for puzzle packs they didn't solve since they share the same puzzle pack state, right?

土豪 2024-10-03 20:29:56

在“游戏套件编程指南 > 多人游戏 > 玩家组”中,他们指出“通常,您的游戏应该呈现自己的用户界面,以允许玩家选择用于计算玩家组编号的参数。”我猜他们不打算允许你需要的这种限制。

我只能看到四个选项:

  1. 使用地图的“演示版”(即,如果用户购买了地图 A,则无论客座玩家是否购买 A,他都可以在 A 上“主持”一场比赛)。如果您的游戏也可以单人游戏,那么它可能会被用作对客人的某种广告。
  2. 创建您自己的服务器。这是邪恶且晦涩的,但我想你可以用这种方式制定任何类型的匹配规则。
  3. “拒绝”未购买地图的玩家(从未测试过,但我想这对于被拒绝的玩家来说会很不愉快)。
  4. 创建“地图组”。以汽车为例(适用于摩托车),可能有 100cc 组、250cc 组等。人们可以购买“A”(100cc)并与购买“B”(也是100cc)的玩家竞争。对于地图,可以是“水域地图”、“冬季地图”等等。这将为购买增加价值并使我们的事情变得容易。但我想这也需要一些 UI 编码。

考虑到最大玩家人数只有 4 人,我认为苹果并没有准备 Game Center 来承载复杂的游戏。也许它就像 OpenGLES:很棒的工具,但您必须是超级硬核开发人员才能制作像虚幻引擎的 Epic Citadel 这样超级酷的东西(遗憾的是巴西的 App Store 上不提供)。

In "Game Kit Programming Guide > Multiplayer > Player Groups", they state that "typically, your game should present its own user interface to allow the player to select parameters that are used to calculate the player group number." I guess they didn't planned to permit this kind of restriction you need.

I can only see four options:

  1. Use a "demo version" of the map (i.e. if a user bought map A, it will allow him to "host" a match on A, wherever guest players bought A or not). If your game can also play as single player, it may be used as some kind of advertising for guests.
  2. Create your own server. This is evil and obscure, but I guess you can make any kind of matching rule this way.
  3. "Reject" a player that didn't bought the map (never tested, but I guess it will be unpleasant for the rejected player).
  4. Create "groups of maps". Using the car's example (adapted to motorcycles), there could be a 100cc group, a 250cc group, and so on. People could by "A" (100cc) and compete against players that bought "B" (also 100cc). With maps, could be "water maps", "winter maps", and so on. This will add value to the purchase and make things easy for us. But I guess this will require some UI coding, too.

Considering the maximum number of players is only 4, I don't think Apple prepared Game Center to host complex games. Maybe it's just like OpenGLES: great tool, but you must be a super-hardcore-developer to make something uber-cool like the Unreal Engine's Epic Citadel (not available on Brazil's App Store - sadly).

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