CocoonJS and Game Center Question

Discussion and feedback on Construct 2

Post » Mon Jul 14, 2014 6:55 pm

I was just curious if anyone has successfully implemented Game Center (iOS) leaderboards into their CocoonJS game?

I've searched through posts and have seen that older versions of CocoonJS was not capable, but based on Ludei's site it is capable now and even have an example of it (although the example doesn't bring up Game Center like it is supposed to). Paired with Ludei's terrible documentation and "tutorials", I have had a frustrating time trying to get leaderboards into my iOS game.

Just for reference:
I have a iOS developer account
I set up a leaderboard in iTunes Connect with an ID that I put into the CocoonJS plugin in C2
On Ludei's Dev Portal, I have checked the Social checkmark for Game Center
I have cloud compiled it and ran it NOT on the simulator, but on my iPhone 5s

Is there something else I'm possibly missing or some sort of setting in Xcode they do not mention needs to be changed? Any help is appreciated because this is one of the last few things I need to finish before I can release my game.

Thanks everyone!
Twitter: https://twitter.com/pudgyplatypus

Learn to make a clicker game for cheap!
https://www.scirra.com/store/games-with ... e-game-666

Try out Pixel Golf on the Scirra Arcade!
https://www.scirra.com/arcade/sports-ga ... el-golf-67

Pudgy Platypus Games website!
www.pudgyplatypus.com
B
58
S
19
G
5
Posts: 212
Reputation: 7,310

Post » Mon Jul 14, 2014 7:28 pm

As you hinted, its a nightmare to get started due to absolutely horrendously poor documentation from Ludei (I guess because the plug-in is not finished)...

What you need to do (it would seem)

1) Install C2 build 168
2) download the plug-in from Ludei's blog and manually install by copying the contents of the plug-in folder into the coocoonjsads folder in the plug-ins folder, AND copy the cocoonjs_prelude.js file into the html5 folder.
3) DON'T UPDATE C2
4) You MUST set the cocoonjs plug-in in Spriter to EITHER google play OR game-center but NOT "automatically select based on platform"

best of luck,

Mike

this is what worked for me.
B
49
S
9
G
4
Posts: 425
Reputation: 7,037

Post » Mon Jul 14, 2014 9:50 pm

@Brashmonkey
Thanks for that! I will try that, but is there any logic in why it's got to be build 168?

I will have to make sure nothing in my game uses the newer functions that are in the later builds..hmm.

Thanks again!
Twitter: https://twitter.com/pudgyplatypus

Learn to make a clicker game for cheap!
https://www.scirra.com/store/games-with ... e-game-666

Try out Pixel Golf on the Scirra Arcade!
https://www.scirra.com/arcade/sports-ga ... el-golf-67

Pudgy Platypus Games website!
www.pudgyplatypus.com
B
58
S
19
G
5
Posts: 212
Reputation: 7,310

Post » Tue Jul 15, 2014 3:27 pm

The only logic is that the attempts I made to use the plugin (cocoonjs) with the latest beta or stable have failed... only 168 seems to work...I think because ludei is trying (slowly it would seem) to get it fully working and stable before making sure it works with the latest build.... then I'm sure documentation will take quite some time after that.

best of luck.

-Mike
B
49
S
9
G
4
Posts: 425
Reputation: 7,037

Post » Wed Jul 16, 2014 10:28 am

Djfuzion wrote:I was just curious if anyone has successfully implemented Game Center (iOS) leaderboards into their CocoonJS game?

I've searched through posts and have seen that older versions of CocoonJS was not capable, but based on Ludei's site it is capable now and even have an example of it (although the example doesn't bring up Game Center like it is supposed to). Paired with Ludei's terrible documentation and "tutorials", I have had a frustrating time trying to get leaderboards into my iOS game.


I got it working on my game (Trambo) earlier this year. I think I was using compiler version 1.4.7 and the latest C2 beta that was available then.

Later I updated the game with 2.0.0 and the Game Center stopped working. FFUU.

Now then, I am updating the game again tomorrow - this time using r172 (I think) and 1.4.7. The game seems to at least connect to the Game Center normally and it seems the score posting is working as well.

I'll keep you updated in case something goes terribly wrong tomorrow. I can also post the code I am using in C2 if it works fine.

Laters!
Image
B
93
S
36
G
17
Posts: 351
Reputation: 15,828

Post » Wed Jul 16, 2014 7:30 pm

@Brashmonkey Ah yea I see I see, well hopefully that is the case!

@robotecollective thanks for the info! Yea it's quite frustrating having to rely on these other services/programs to be able to build apps. Yea let me know how it turns out and whatever kind of suggestions you have that worked for you.

One thing I thought of the other day which actually caused me more problems: Which version of the CocoonJS plugin are you using in C2? Before I was just using whichever version was in the regular C2 install but realized the example file Ludei showed had some other functions that were not available in the version I have. So I downloaded the one from Github and used that version but now when the app starts up and tries to do something with Gamekit it just stays at a black screen....

Man mobile games from C2 to CocoonJS has been quite an uphill battle, at least for me.
Twitter: https://twitter.com/pudgyplatypus

Learn to make a clicker game for cheap!
https://www.scirra.com/store/games-with ... e-game-666

Try out Pixel Golf on the Scirra Arcade!
https://www.scirra.com/arcade/sports-ga ... el-golf-67

Pudgy Platypus Games website!
www.pudgyplatypus.com
B
58
S
19
G
5
Posts: 212
Reputation: 7,310

Post » Wed Jul 16, 2014 8:31 pm

Djfuzion wrote:thanks for the info! Yea it's quite frustrating having to rely on these other services/programs to be able to build apps. Yea let me know how it turns out and whatever kind of suggestions you have that worked for you.

One thing I thought of the other day which actually caused me more problems: Which version of the CocoonJS plugin are you using in C2? Before I was just using whichever version was in the regular C2 install but realized the example file Ludei showed had some other functions that were not available in the version I have. So I downloaded the one from Github and used that version but now when the app starts up and tries to do something with Gamekit it just stays at a black screen....


I am using the latest build from Scirra (always) and when I compile through the Ludei cloud service, I choose version 1.4.7. With the launcher I always test with the latest version they have on App Store. Game Center does not work there.

Today our tests prove that Game Center works when using 1.4.7 version of the compiler - an old player successfully updated his score and a new player got his score through. WOO! We may get some more attention to our game tomorrow, that is way I am testing this now.

I can post the code for you that works, if you want.

Djfuzion wrote:Man mobile games from C2 to CocoonJS has been quite an uphill battle, at least for me.


Haha, yeah - I feel you. Just hang in there. Things are getting better all the time and C2 is really a great little piece of software. Just look at these devs, they are here literally every day, answering questions that we have. I think they deserve our support.
Last edited by robotecollective on Wed Jul 16, 2014 8:32 pm, edited 1 time in total.
Image
B
93
S
36
G
17
Posts: 351
Reputation: 15,828

Post » Wed Jul 16, 2014 8:31 pm

Edit: double post. Mods, feel free to delete this.
Image
B
93
S
36
G
17
Posts: 351
Reputation: 15,828

Post » Wed Jul 16, 2014 8:41 pm

Also, check out this bug report I got from one of our players:

"If I visit gamecenter for TRAMBO it makes my ipad crash. Then every time I visit gamecenter again after that it crashes. I can only get out of the cycle by visiting gamecenter in airplane mode. So... Yeah, I hope your update fixes it!"

That was our last update using CocoonJS compiler version 2.0.0... YIKES.
Image
B
93
S
36
G
17
Posts: 351
Reputation: 15,828

Post » Thu Jul 17, 2014 2:15 pm

@robotecollective awesome news! Well hopefully the update goes through quickly...wish updating on the store was a bit quicker.

Have you tried 2.0.1 at all? That is the one I been using but yea no dice on the GameCenter. I will have to try out the 1.4.7 compiler then, but I guess I will have to roll back my C2 because I installed that CJS plugin which caused more problems when compiled.

Yea I would totally love to see an actual working example of game center, even just a small snippet would work for me, just to make sure I'm trying to call it at the right time and using the right ones, that would be fantastic!

Thanks again!
Twitter: https://twitter.com/pudgyplatypus

Learn to make a clicker game for cheap!
https://www.scirra.com/store/games-with ... e-game-666

Try out Pixel Golf on the Scirra Arcade!
https://www.scirra.com/arcade/sports-ga ... el-golf-67

Pudgy Platypus Games website!
www.pudgyplatypus.com
B
58
S
19
G
5
Posts: 212
Reputation: 7,310

Next

Return to Construct 2 General

Who is online

Users browsing this forum: justifun and 11 guests