GameCenter - 考虑应用内购买
在我看来,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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在地图案例中,我认为您需要让用户首先选择地图。否则,假设您匹配两个玩家,并且他们有共同的地图 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.
这是支持应用内购买和游戏中心的另一个困境(请在评论中回复)。
假设我的游戏包含十个单独拼图包的应用内购买,并且我的游戏还包含使用 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?
在“游戏套件编程指南 > 多人游戏 > 玩家组”中,他们指出“通常,您的游戏应该呈现自己的用户界面,以允许玩家选择用于计算玩家组编号的参数。”我猜他们不打算允许你需要的这种限制。
我只能看到四个选项:
考虑到最大玩家人数只有 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:
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).