我正在使用Google Play游戏服务为Android和iOS开发实时多人游戏。我正在使用它的C ++ API,使用Cocos2d-x。
正如谷歌的文档所述,GPG在游戏中实现,这在Android上运行良好。但是在iOS上,在实时房间有足够的玩家后,游戏崩溃了。
快照未启用,我正在使用Google的用户界面进行实时录制。
其他功能运行良好,经过测试的功能:
朋友的邀请
邀请朋友
Leaderborads
显示成就用户界面
登录G +时记录日期:
cocos2d: [LUA-print] Loading game
Signing in to GPG
cocos2d: [LUA-print] Entered background
2014-10-14 15:32:34.539 MYAPP iOS[10716:1633086] VERBOSE: Cancelling event timer
cocos2d: [LUA-print] Entered foreground
Signed in to GPG
MYAPP iOS[10716:1633086] ERROR: Attempting to get name of an invalid Player
MYAPP iOS[10716:1633086] ERROR: Attempting to get avatar URL of an invalid Player
MYAPP iOS[10716:1633086] ERROR: Attempting to get id of an invalid Player
MYAPP iOS[10716:1633086] ERROR: Attempting to get title of an invalid Player
MYAPP iOS[10716:1633086] ERROR: Attempting to get current xp of an invalid Player
MYAPP iOS[10716:1633086] ERROR: Attempting to get last level up timestamp of an invalid Player
MYAPP iOS[10716:1633086] ERROR: Attempting to get current level of an invalid Player
MYAPP iOS[10716:1633086] ERROR: Attempting to get level number of an invalid PlayerLevel
MYAPP iOS[10716:1633086] ERROR: Attempting to get minimum xp of an invalid PlayerLevel
MYAPP iOS[10716:1633086] ERROR: Attempting to get maximum xp of an invalid PlayerLevel
MYAPP iOS[10716:1633086] ERROR: Attempting to get next level of an invalid Player
MYAPP iOS[10716:1633086] ERROR: Attempting to get level number of an invalid PlayerLevel
MYAPP iOS[10716:1633086] ERROR: Attempting to get minimum xp of an invalid PlayerLevel
MYAPP iOS[10716:1633086] ERROR: Attempting to get maximum xp of an invalid PlayerLevel
运行CreateRealTimeRoom()后记录日志:
MYAPP iOS[10716:1633236] VERBOSE: ProcessedInState is not implemented.
MYAPP iOS[10716:1633236] VERBOSE: OnConnectNetworkStart is not implemented.
MYAPP iOS[10716:1633236] INFO: Connect with retry.getRetryAuthToken(): 1
MYAPP iOS[10716:1633236] INFO: Token expired. Refreshing.
MYAPP iOS[10716:1633236] Trying to refresh token; old token is: XXX
MYAPP iOS[10716:1633086] Auth updated! ... maybe. New token is: XXX
MYAPP iOS[10716:1633236] Token refresh success!
MYAPP iOS[10716:1633236] INFO: Trying to connect with returned auth token.
MYAPP iOS[10716:1633236] VERBOSE: ProcessedInState is not implemented.
MYAPP iOS[10716:1633236] VERBOSE: OnConnectNetworkDone is not implemented.
MYAPP iOS[10716:1633236] VERBOSE: ProcessedInState is not implemented.
MYAPP iOS[10716:1633236] VERBOSE: OnEnterRoomStart is not implemented.
MYAPP iOS[10716:1633236] VERBOSE: OnEnterRoomEnd is not implemented.
MYAPP iOS[10716:1633393] INFO: mPlayerId: 112816036638541164521 Enter room: ChoKCQilzeL2rgQQAhABGAAg____________ARCA1Jb6uNOCgrsB
MYAPP iOS[10716:1633393] VERBOSE: RtmpDcmLog is not implemented.
created a room 1
[RTMP] (Error) +[GPGRealTimeRoomMaker performPreCheck:checkDelegate:]:[main] Sign in to the Google Play Games Service before using the multiplayer functions
在房间有足够的玩家后,应该调用ShowWaitingRoomUI的回调,但它不是:
MYAPP iOS[10716:1633236] ERROR: - unhandledMessage: message.type=48
MYAPP iOS[10716:1633393] ERROR: Attempting to get participant for invalid participant id.
MYAPP iOS[10716:1633393] INFO: Waiting for connection from p_CJXeyNKXhKOL3QEQAQ
OnParticipantStatusChanged participant:p_CJXeyNKXhKOL3QEQAQ status: 2
JOINED OnParticipantStatusChanged participant :p_CJXeyNKXhKOL3QEQAQ
JOINED OnParticipantStatusChanged room :ChoKCQilzeL2rgQQAhABGAAg____________ARCA1Jb6uNOCgrsB
OnParticipantStatusChanged participant participantsInRace_.size: 1
MYAPP iOS[10716:1633394] VERBOSE: RtmpPeerLog is not implemented.
MYAPP iOS[10716:1633394] ERROR: peer_capabilities must not be null in PeerStateMachine::WaitingForOutgoingRemoteConnectionNoSessionId
MYAPP iOS[10716:1633394] VERBOSE: EnteredState is not implemented. MYAPP iOS[10716:1633394] INFO: OP: 1
MYAPP iOS[10716:1633394] INFO: CALL_STATE_CHANGED_OP: New state: 1
MYAPP iOS[10716:1633394] ERROR: peer_capabilities must not be null in PeerStateMachine::WaitingForConnectionData
MYAPP iOS[10716:1633394] VERBOSE: EnteredState is not implemented.
答案 0 :(得分:2)
您是否尝试使用真正的iOs设备? 在iphone模拟器中发生此错误。