问题标签 [gkturnbasedmatch]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ios - Game Center "the specified participant does not have the required turn state"
I am occasionally receiving the following error when I try to send a turn in a Sandbox Game Center turn based play game.
Error Domain=GKErrorDomain Code=23 "The requested operation could not be completed because the specified participant does not have the required turn state." UserInfo=0x209e5110 {GKServerStatusCode=5103, NSUnderlyingError=0x209e56b0 "The operation couldn’t be completed. status = 5103, Session: 4d278ed6-d546-4d31-bb6f-0a4ae89873aa current turn: 8 isn't as expected: 1", NSLocalizedDescription=The requested operation could not be completed because the specified participant does not have the required turn state.
The 'current turn' and 'expected' numbers differ. I am sending between two devices, one with iOS5 and one with iOS6. I have accounted for the depreciation of the old call using the following line:
The input parameters 'look' to be correct i.e I can't see any clear errors. However, I don't really understand the error message. I have attempted to find more via searching but can't find anything that explains the error. Apple docs just has the text that is given in the message. Can anyone point me to a place which explains the error in more detail? Also, does the 'state' mean the participant 'status' on the other device?
Thanks.
game-center - 当玩家退出游戏时如何结束基于 2 人回合的游戏中心比赛
我到处搜索,没有找到解决这个问题的方法:
我有一个 2 人游戏,回合制,通过游戏中心。
玩家完成移动后,他可以在 Game Center 中退出游戏。在我的情况下,这自动意味着游戏已经结束并且其他玩家赢了。但是,我找不到实现此目的的 Game Center 方法。
我不能使用 endMatchInTurnWithMatchData 因为它不是这个玩家轮到的。
如果我在轮到其他玩家时尝试使用 endMatchInTurnWithMatchData,这也是不可能的,因为没有其他玩家可以将 endMatchInTurnWithMatchData 发送给(因为其他玩家已经退出)。
有没有人知道这个问题的解决方案?
谢谢,马丁
ios - Gamekit 回合制游戏
我计划再次尝试我的一款 iOS 棋盘游戏,它是围绕 GameKit 的回合制 API 构建的。
我想通过限制每个回合的可用时间来提供最佳的游戏体验。从这里开始,是否可以使用基于回合的 API?
目标是让玩家在 60 秒内进行游戏,并在棋盘顶部显示一个计数器,以便他们可以看到何时轮到自己。
那么,全球性的问题是:有没有办法阻止玩家在不退出游戏的情况下停止游戏?如果玩家暂时失去数据连接会发生什么?
如果有人能分享他在这类游戏中的经验,我会很高兴。
干杯。
西里尔
game-center - 用于回合制游戏的 RubyMotion 和 GameKit
我是 RubyMotion 的新手,虽然我找到了一些很好的教程,但我找不到任何关于将 RubyMotion 与 GameKit 和 GameCenter 一起使用的信息。
背景:我做了一个井字游戏来学习 RubyMotion。游戏在本地运行良好,但我想添加多人游戏功能。Obj-C 中的那个教程(http://www.raywenderlich.com/5480/beginning-turn-based-gaming-with-ios-5-part-1)非常全面,但我未能将其翻译成 RM。
该应用程序非常(非常)简单,并且非常凸版“esque”(减去设计)。它包含一个包含已启动游戏和新游戏选项的桌面视图,以及井字游戏本身的视图。
是否有人对 RubyMotion 中的 GameKit 框架有经验,或者找到了有关该主题的教程?实际上,我什至无法在应用程序加载时进行用户身份验证的第一步(例如GKLocalPlayer.localPlayer
导致未初始化的常量等)。
感谢您的时间!
PS 这是我的第三个应用程序(但首先在 RubyMotion 中)所以我认为 GameCenter 和 AppID 等在 iTunesConnect 上已正确配置
objective-c - GKTurnBasedMatch 参与者不正确/重复
我正在开发一款基于回合制的 GameCenter 游戏。AGKTurnBasedMatch
是用GKMatchRequest
,minPlayers
和maxPlayers
设置为 2 创建的。我有一段NSInvalidArgumentException
时间试图用 结束游戏endMatchInTurnWithMatchData
,告诉我我没有设置matchOutcome
所有参与者。在此之前匹配对象的日志显示我的匹配如下所示:
我GKTurnBasedParticipants
这里有2个以上,其中两个是同一个玩家!我在游戏中没有做任何特别的事情,除了每回合调用以下内容:
有谁知道这里发生了什么?这是一个两人游戏,那么我怎么会得到一个混乱的匹配对象,我该如何防止这种情况呢?
ios - IOS游戏中心对接会
我正在使用游戏中心开发基于回合的游戏。我耐心地研究了以下问题,但我希望有人提出解决方案。
我用某张地图开始一个自动匹配游戏,我想只连接到选择相同地图玩的玩家。有什么办法可以限制吗?
谢谢你。
ios - IOS游戏中心GKLocalPlayerListener
我试图在基于回合的游戏中实现一个事件监听器,这样玩家就可以在轮到他或他被朋友邀请时接收。GKTurnBasedEventHandler 在 IOS 7 中已弃用,我在文档中读到我应该使用 GKLocalPlayerListener;但这就是它的延伸。有没有人用过,因为到处都没有信息。
这是我之前尝试过的,它不起作用。
io - 确定 GKPlayer 的性别
我正在开发一个应用程序,我想为无法从 GameCenter 返回照片的 GKPlayers 列表显示男性符号或女性符号。有没有办法确定 GKPlayer 的性别?
ios - 在 Game Center 回合制比赛中结束回合。
我在回合制游戏应用程序中无法结束回合。
我正在使用的方法是
这p
是我的 nextParticipants 的 NSArray,这是我的声明:这是声明和分配
我正在反转参与者数组以获取玩家的轮流顺序。(只有 2 个)
这一切都编译并运行没有错误,但回合实际上从未传递给其他玩家!
认为我的 p-array 是我尝试通过它而不反转它产生相同结果的问题。
有谁知道处理这个问题的正确方法?
c# - 将鼠标悬停在对象 unity3d 上时显示工具提示
当鼠标悬停在对象上时,我想显示这样的工具提示,这是示例图像:
和
我已经尝试了下面的代码,但是当我将鼠标悬停在对象上时,debug.log 上的消息没有显示出来,我给对象取的名字是这样的:
这是我的对象(我使用列表来多个对象和我给每个对象命名的名称),(对象的名称“Yify”在右侧,深绿色):
请帮忙。谢谢你。