iOS Gamecenter & Cocoonjs

  • i've searched forums, tutorial, ludei's site, could not find documentation of using cocoonjs gamecenter feature.

    so this is what i've done, on my first layout event, on start of layout>cocoonjs request login.

    and my game event, at end of game, i submit the high score to leaderboard ,using my itunesconnect's leaderboard ID as cocoonjs leaderboard name.

    built an Adhoc ipa on my phone, having trouble log into my gamecenter in game, and i tried log in and out many times, for once i get to create a sandbox ID, which shows the gamecenter, but didn't have my score on the leaderboard, i tried log out again and log in, couldn't get the login request show up again....

    what have i done wrong? and your experience with testing gamecenter before release?

  • This is relevant to my interest, going through same kind of problems right now. Anyone?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I am interested too

  • ok, after days of searching for answer, i believe i've figured it out, sadly from other game dev software's forum...

    the event is pretty straight forward, how i did as mentioned above was correct, testing in adhoc part was tricky! you need to log out of your gamecenter first before launching adhoc version of the app you want to test.

    if you did not log out in first place, gamecenter could play up, like i experienced before, it may not log in or cant connect to server or all sorts of strange error message.

    and the worst is ios7 disable your app's gamecenter feature, this happen after 3~5 failed attempt to login, you simply stop getting any gamecenter response, no login box, nothing(this can be misleading to bad event coding), and with ios7 you cant re-enable gamecenter for your app(stupid i know).

    the solution is go to general>rest>reset all settings

    it will wipe out all your settings on your device, data remain on device.

    after that you can test your app again with gamecenter.

    go to your adhoc app, gamecenter will pop up and ask you to login, use your login, and it will ask for more info like register a new ID, continue with that because its creating a sandbox account for you, once thats set up, you should be in sandbox mode gamecenter :)

    hope that helps, and i hope there are some proper documentation on cocoonjs plugin, i have a feeling i have to go through this again when i need IAP and other feature :/

  • Ok! Glad you got it working.

    I'll keep testing this myself this week. I was wondering if it was the .ipa build that was causing the problem... anyways, thanks for the tips!

  • robotecollective whats ur ipa problem?

  • robotecollective whats ur ipa problem?

    It was the exact problem you had, the game recognized Game Center but did not keep up with the score.

  • have you tried using another sandbox account to post score? it might need more than 1 user score to show up, im not too sure but after i reset all setting, i made another sandbox ID, post score, and i can see both score on leaderboard.

  • have you tried using another sandbox account to post score? it might need more than 1 user score to show up, im not too sure but after i reset all setting, i made another sandbox ID, post score, and i can see both score on leaderboard.

    I am testing this as we speak, it seems to be working now!

  • > have you tried using another sandbox account to post score? it might need more than 1 user score to show up, im not too sure but after i reset all setting, i made another sandbox ID, post score, and i can see both score on leaderboard.

    I am testing this as we speak, it seems to be working now!

    hooray <img src="smileys/smiley32.gif" border="0" align="middle" />

  • Hi guys!

    I managed to get the Game Center hiscores working. However, it raised a strange issue with CocoonJS. Whenever I opened the leader boards from the game and tried to play again, the controls got stuck and I had to restart the game.

    I searched the CocoonJS forums and it seems at least one guy had the same problem: http://ow.ly/ukVcp

    Any of you guys managed to get those scores to work?

  • Edit: this problem is no more relevant.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)