How do i test gamecenter multiplayer?

If my test identifier works but yours doesn’t, that seems to point to something in your iTunes Connect setup. Did you set up your app on that side for everything related to multiplayer?

Brent

Should my Game Center be turned on in my 1 version even though I have not published it yet.
Thanks
Scott

Edit: here are images I have enabled in Game Center

https://drive.google.com/file/d/0B5swSg-cH4L6ZXlFR3FrTDF0LW8/view?usp=sharing

https://drive.google.com/file/d/0B5swSg-cH4L6OEhBQ2NIN3ZFRVU/view?usp=sharing

Hi,

 

  I’m new to Game Centre Turn Based Multiplayer Game,I do Some basic Code from the Sample.Once i Tested it in device it works well ,but i faced below Problems.

 

  1. Player1 Finished Turns , But not Received At Player 2 ( No notification , Some times Shared Data Missing )

 

2.Once Player1 Created Match , Want to store The Initial Data(Grid),So Player1 can Get Same Data(Grid),when Logging in Another Device.Even if Player1 Not end His Turn.

 

Ex: player1 -> Create Match -> Grid Created -> Go Back to Menu -> Re enter into Same Match -> Need Same Grid(Initial) [Even User log in from Diff Device].

 

  1. Communication Between 2 Devices Failed Some times(low Network),Which Makes game Misleading.

 

 

Please help me to Solve this.

 

Thanks.

Same here
I called apple going to talk to them tomorrow.

No Possible way in Corona to Solve this.

Thanks

It is your apple bundle I’d that is the problem if you are having the problem I am having.

I’m Not having the Same problem , My App Running well in Device.But Sometimes Communication failed between devices and i need to store data in GC.

Thanks

waiting for suggestions…

Handling the Current Player’s Turn

  • saveCurrentTurnWithMatchData:completionHandler:

Update the match data without advancing the game to another player.

This method in IOS was used to Update Data in GC , is this Possible in Corona.

What if you set nextParticipant to your own gc id?

https://docs.coronalabs.com/daily/plugin/gameNetwork-apple/request.html#end-turn

Also if you don’t mind me asking how did your app ready for gamecenter?

Thanks,

Scott

It been over 3 day so i am bumping. Sorry for nagging.

Thanks,

Scott

Anything?

Hi @scottrules44,

Game Center in general requires fairly comprehensive setup/code, and multiplayer even moreso. The community/staff would need to see much more of your current code base to gather clues on what the issue may be.

Take care,

Brent

local gameNetwork = require("gameNetwork") local platformName = system.getInfo( "platformName" ) local function loadLocalPlayerCallback( event ) pluginStorage.loggedIntoGC = true end local function tempDelay( ) gameNetwork.request( "loadLocalPlayer", { listener=loadLocalPlayerCallback } ) end local function gameNetworkLoginCallback( event ) timer.performWithDelay( 1000, tempDelay , 1 ) end local function gpgsInitCallback( event ) gameNetwork.request( "login", { userInitiated=true, listener=gameNetworkLoginCallback } ) end local function authorize() if ( system.getInfo("platformName") == "Android" ) then print("logging into GPGS") gameNetwork.init( "google", gpgsInitCallback ) elseif ( system.getInfo("platformName") == "iPhone OS" ) then print("logging in to GameCenter") gameNetwork.init( "gamecenter", gameNetworkLoginCallback ) end end authorize() -- local gameCenterIcon = display.newImageRect( "images/gamecenter.png", system.DocumentsDirectory, 75 , 77) gameCenterIcon.y = display.contentCenterY gameCenterIcon.x = scale0+(.5\*gameCenterIcon.width) -- local function loadGameNetwork() if (platformName == "Android") then local function loadLocalPlayerCallback( event ) end gameNetwork.show("selectPlayers", { listener = selectPlayersListener, minPlayers = 1, maxPlayers = 1 }) elseif (platformName == "iPhone OS") then local parameters = { minPlayers = 2, maxPlayers = 2, playerGroup = 0, playerAttributes = { 1, 2 }, listener = createMatchLis } gameNetwork.show( "matches", parameters ) end end local function gameNetworkLoginCallback( event ) pluginStorage.loggedIntoGC = true loadGameNetwork() end local function googleCallBack( event ) if not event.isError then gameNetwork.request( "login", { userInitiated=false, listener=gameNetworkLoginCallback } ) else pluginStorage.loggedIntoGC = false native.showAlert( "Cannot login!", event.errorMessage, { "OK" } ) end end local function gamecenterCallBack( event ) if ( event.type == "showSignIn" ) then -- This is an opportunity to pause your game or do other things you might need to do while the Game Center Sign-In controller is up. elseif ( event.data ) then pluginStorage.loggedIntoGC = true loadGameNetwork() elseif not event.data then pluginStorage.loggedIntoGC = false native.showAlert( "Unable to Sign In", "", { "OK" } ) end end local function gameCenterTouch( event ) if (event.phase == "began") then if pluginStorage.loggedIntoGC == true then loadGameNetwork() else if (platformName == "Android") then gameNetwork.init( "google", googleCallBack ) elseif (platformName == "iPhone OS") then gameNetwork.init( "gamecenter", gamecenterCallBack ) end end return true end end gameCenterIcon:addEventListener( "touch", gameCenterTouch )

I have the plugin in build.setting

Here is my problem

https://drive.google.com/file/d/0B5swSg-cH4L6UTR6VmpFR2hXTmc/view?usp=sharing

Profile used

https://drive.google.com/file/d/0B5swSg-cH4L6dlBFVVUxbm5vT1E/view?usp=sharing

Thanks, 

Scott

Hi Scott,

Are you using an “AdHoc” or a true “distribution” provisioning profile? The fact that it says “Devices: 0 total” hints to me that it’s not AdHoc, meaning it’s for actual distribution to the App Store (which of course isn’t meant for testing). Can you configure an AdHoc profile and test using that?

Brent

same error with an ad hoc

Hi Scott,

If possible, can you trim your code down to simply Game Center for this issue? At a glance, I don’t see anything blatantly wrong with how you’re trying to load the proper game network for the proper platform, but it complicates the code considerably and there might be something awry with the listeners, initiation, etc. It would be easier to diagnose if you temporarily trimmed out (or commented out) the Google aspects.

Thanks,

Brent

Tried this still the same error.

I made a sample:

https://drive.google.com/folderview?id=0B5swSg-cH4L6N3NzOXpLbmpqR2M&usp=sharing

Thanks,

Scott

Hi Scott,

Can you remove “playerGroup” and “playerAttributes” from your match setup? I want to check if it’s something involved in those parameters (they are difficult to understand even when reading Apple’s docs).

Brent

Same Error :( , updated the drive sample above. 

Thanks,

Scott