CocoonJS plugin updates

From the Asset Store
Fantasy Game includes more than 600 sound effects inspired by hit computer games like World of Warcraft and Diablo.
  • Hello,

    > ludei is there a documentation on how to use leaderboard? it seems the setting has changed in new plugin(from old C2 built in cjs plugin), also google play leaderboard. i've looked up the demo capx, still confused what to put into "leaderboard_id", also no more request login for leaderboard? i see thats part of "social" now, which i believe is for facebook and not google play or ios gamecenter?

    >

    Sorry, but I don't understand what you mean. There are no new changes in the C2 Plugin. All the updates we made were for improving the functionality internally. The leaderboard_id works as usually. You have to configure the service in iTunes or in GooglePlay and the fill the field with the id they give you:

    Game Center:

    https://developer.apple.com/library/ios/DOCUMENTATION/LanguagesUtilities/Conceptual/iTunesConnectGameCenter_Guide/Leaderboards/Leaderboards.html

    Google Play:

    https://developers.google.com/games/services/common/concepts/leaderboards

    > Iam not sure if this is the right thread to ask this but does anyone else got problems with ads on iOS(especially iPad) since the 2.1.1 release?

    > It seems that cocoonjs does not recognize the correct device and chooses the iPhone ad-Id's instead of the iPad id's. I have tested this with admob, chartboost and iAds. While the other networks seems to work with the iPhone id's, chartboost does not. I have also postet a question ludei 's helpdesk a few days ago but no response yet.

    >

    Yes, we are having a look at it, but we didn't find any error. We suggest you to check if the ids you generated for the ads are in the right place. According to the description of the issue, it can be that you mixed them. Our demo works fine in all the devices we have (iOS and Android) using the C2 Plugin and the JS Plugins. If the issue persists, please, send us a test case using you ids in which we can reproduce the issue.

    Regards.

    ludei thanks for quick reply & good job with recent improvements, cjs deserved to stay in c2 official support! i noticed new Cocoonjs plugin has removed "Is logged in to Game Center", also "Request login", are these no longer necessary?

  • ludei thanks for quick reply & good job with recent improvements, cjs deserved to stay in c2 official support! i noticed new Cocoonjs plugin has removed "Is logged in to Game Center", also "Request login", are these no longer necessary?

    They are both in Social. The "Is logged in" now is included internally in every Social Service available (Facebook / Google Play / Game Center) and the "Request Login" should appear in Social too. The required params depend on the service you want to use. You can select the social service through the CocoonJS object ( you can pick between GP / GC depending on the nature of the device, o force the device to use just one). Unfortunately, you still cannot use Facebook AND Google Play or Facebook AND Game Center. That requires a lot of programming time and we still cannot face it.

    All the required params you need to fill in the CocoonJS object for configuring the Social Services are specified there.

  • ludei

    [quote:2id1pted]Hello,

    I am afraid I can not tell you much more than what it is already said in our Community. We are about announcing big improvements and great news, but we can not tell anything yet. Hope you understand the situation.

    Regards.

    Did this already happen? I was hoping to see something about Cordova plugins in CJS builds.

  • I've tried looking for the problem I'm having but haven't come up with much for results. I have successfully gotten Game Center leaderboards to work in my game, so at the end of the level I pull up the leaderboard to show your score which works perfectly fine. The problem comes in when the user MANUALLY clicks a button that opens that same leaderboard, the leaderboard comes up fine and works but when you close the leaderboard the game continuously thinks you are touching one side of the screen and there's no way to stop it unless I force quit out of the app.

    ludei

    Has anyone come up with this bug also and have you found a way around it? I mean I guess I can always just make it so you can't tap a button to open leaderboards but that seems silly.

  • Yes, myself and others have mentioned this bug on the Github page. Same thing happens if you are touching the screen when a full screen ad comes up.

    To work around it you have to basically do a check if you are touching the screen before launching game center.

    https://github.com/ludei/Construct-2-plugin/issues/43

  • >

    > ludei thanks for quick reply & good job with recent improvements, cjs deserved to stay in c2 official support! i noticed new Cocoonjs plugin has removed "Is logged in to Game Center", also "Request login", are these no longer necessary?

    >

    They are both in Social. The "Is logged in" now is included internally in every Social Service available (Facebook / Google Play / Game Center) and the "Request Login" should appear in Social too. The required params depend on the service you want to use. You can select the social service through the CocoonJS object ( you can pick between GP / GC depending on the nature of the device, o force the device to use just one). Unfortunately, you still cannot use Facebook AND Google Play or Facebook AND Game Center. That requires a lot of programming time and we still cannot face it.

    All the required params you need to fill in the CocoonJS object for configuring the Social Services are specified there.

    ludei I'm still having trouble to use "Is logged in", can't see any 'Social' option under a 'Function', I was able to add "Is logged in to Game Center" in old C2 embedded CJS plugin, but the manually installed new CJS plugin won't show any 'Social' options under a 'Function', I can see 'Social' outside a Function tho, this possibly a bug?

    To reproduce this problem:

    1. New project

    2. Insert new object > Function

    3. Insert new object > CocoonJs

    4. in event sheet, add event > Function > On Function

    5. right click on the added Function > Add blank sub event

    6. double click on the added blank sub event > Cocoonjs, you will see no 'Social' options available!

  • Did this already happen? I was hoping to see something about Cordova plugins in CJS builds.

    Still working on it. Sorry. We will publish everything as soon as it is ready, so do not worry, we will keep you all inform.

    I'm still having trouble to use "Is logged in", can't see any 'Social' option under a 'Function', I was able to add "Is logged in to Game Center" in old C2 embedded CJS plugin, but the manually installed new CJS plugin won't show any 'Social' options under a 'Function', I can see 'Social' outside a Function tho, this possibly a bug?

    To reproduce this problem:

    1. New project

    2. Insert new object > Function

    3. Insert new object > CocoonJs

    4. in event sheet, add event > Function > On Function

    5. right click on the added Function > Add blank sub event

    6. double click on the added blank sub event > Cocoonjs, you will see no 'Social' options available!

    It is not a bug. You should see the attached image when adding a condition. If you can see this, it means you are using the latest plugin and the "Is logged in" is done internally and not necessary. If you want to check the code, you can open the runtime.js inside the cocoonjsads folder and open it. If you search for "isLoggedIn()", you will find it as a condition. We are checking it for you.

    Regards.

  • >

    > Did this already happen? I was hoping to see something about Cordova plugins in CJS builds.

    >

    Still working on it. Sorry. We will publish everything as soon as it is ready, so do not worry, we will keep you all inform.

    > I'm still having trouble to use "Is logged in", can't see any 'Social' option under a 'Function', I was able to add "Is logged in to Game Center" in old C2 embedded CJS plugin, but the manually installed new CJS plugin won't show any 'Social' options under a 'Function', I can see 'Social' outside a Function tho, this possibly a bug?

    >

    > To reproduce this problem:

    > 1. New project

    > 2. Insert new object > Function

    > 3. Insert new object > CocoonJs

    > 4. in event sheet, add event > Function > On Function

    > 5. right click on the added Function > Add blank sub event

    > 6. double click on the added blank sub event > Cocoonjs, you will see no 'Social' options available!

    >

    It is not a bug. You should see the attached image when adding a condition. If you can see this, it means you are using the latest plugin and the "Is logged in" is done internally and not necessary. If you want to check the code, you can open the runtime.js inside the cocoonjsads folder and open it. If you search for "isLoggedIn()", you will find it as a condition. We are checking it for you.

    Regards.

    ludei thanks for reply, i'm still a bit confused, i can see the conditions as your attached image ONLY OUTSIDE a "Function", when I'm under a "Function", Cocoonjs conditions are very limited, image I attached is what I see under a "Function", doubt this is normal. (btw, i'm on latest cjs plugin, just updated again this morning)

    [attachment=1:19i2syhh][/attachment:19i2syhh]

    Also attached a capx made with R190, I created a "Function" and a blank sub-event, you can try add cjs condition in the blank sub-event. you should see the problem.

    [attachment=0:19i2syhh][/attachment:19i2syhh]

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think it's normal, what are you wanting to be able to do? Are you wanting Is Logged In as a sub event of the function? That event is a trigger.

  • I think it's normal, what are you wanting to be able to do? Are you wanting Is Logged In as a sub event of the function? That event is a trigger.

    ArcadEd i'm trying to convert my old game to new cjs plugin, which i have a 'gameover' function, triggered that function at end of each game, checks "Is logged In", if true, submit score.

    i was able to add that condition in old built in cjs before, thats why i thought its broken, maybe im doing the events wrong?

  • Well since Is Logged In is a trigger, what you might want to do is just leave it as a stand alone event and set a variable. I do something like

    Is Logged In - Set loggedIn = 1

    Then use that variable (loggedIn) in your function instead.

  • Well since Is Logged In is a trigger, what you might want to do is just leave it as a stand alone event and set a variable. I do something like

    Is Logged In - Set loggedIn = 1

    Then use that variable (loggedIn) in your function instead.

    ArcadEd yeah this will work, thank you! but wouldn't this checks Is Logged In all the time? I missed the old cjs where I can just do it in function, and i can trigger the function whenever i need.

  • No, a Trigger event only happens when that event is triggered.

    This is from the C2 manual

  • So, I'm looking to test a couple of my current projects on my new android device. It's a smartphone, 1.2ghz dual core, running Android 4.4.2.

    I've done some exports with crosswalk, now I'd like to export CocoonJS versions for comparison. All the official documentation on Scirra is out of date. So...where do I start? What do I try? Is it even worth bothering with CocoonJS for android?

    Any input would be a big help...

  • I've published all of my games with CocoonJS, including Hungry Hal https://www.scirra.com/construct2/games/hungry-hal

    My steps, as I am targeting more than just Android 5 and iOS8

    Sign up for their cloud compiling service.

    Download and install the latest plugin, and take a look at the example CAPX included with it. https://github.com/ludei/Construct-2-plugin

    Export your project as CocoonJS (You may need to activate it by right clicking in the export windows and choose "Show depreciated exporters")

    Setup everything on the cloud compiler, drop in your zip file that C2 created and export as Canvas+

    You can also export and then try it in the CocoonJS Launcher app that is available for ios and android. Though I prefer testing actual compiled files.

    If you have more questions, just ask.

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