首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在GameCenter游戏中,我能有超过4名玩家吗?

在GameCenter游戏中,我能有超过4名玩家吗?
EN

Stack Overflow用户
提问于 2013-12-09 05:37:34
回答 1查看 955关注 0票数 2

我正在摆弄一个简单的多人游戏使用游戏中心。我在使用苹果公司的代码。我只是把最大球员的数量改为5名,而不是2名:

代码语言:javascript
复制
- (void)hostMatch:(id)sender
{
GKMatchRequest *request = [[GKMatchRequest alloc] init];
request.minPlayers = 2;
request.maxPlayers = 5;

GKMatchmakerViewController *mmvc = [[GKMatchmakerViewController alloc] initWithMatchRequest:request];
mmvc.matchmakerDelegate = self;

[self presentViewController:mmvc animated:YES completion:nil];
}

request.maxPlayers等于2-4时,它工作得很好,但是一旦超过5,它就会给出以下错误:

The requested operation could not be completed because the match request is invalid.

有人想出解决办法了吗?

EN

回答 1

Stack Overflow用户

发布于 2013-12-09 06:31:38

这一切都取决于您正在创建的游戏类型。下表是苹果公司的:

表7-3 每一种比赛的最大玩家数 匹配类型。最大玩家数 对等点4 主持。16 转向基础上。16

以下是进一步研究的链接:ref/doc/uid/TP40008304-CH12-SW7

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20463858

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档