[Construct2] How to build with CocoonIO


#61

Hi,
No it’s not your developer link. It’s just the link to your facebook page.
In my case it’s this: https://m.facebook.com/shatterboxmarketplace/

Hope this helps.

Regards
Andy


#62

Hi!
I’m about to create new free capx examples for @cranberryga 's plugin! Remember, you always can use any cordova plugin with CocoonIO. I’ll give my very best to show you how with an example file :wink:

I updated the first post, there you find a new link to an overview page for free examples. You also find those files here:

Requests are welcome!

I’m already done with

  • Cordova Chartboost Ads
  • Cordova Game
  • Cordova Dialog

and this is already on my list.

  • Cordova IAP
  • Cordova AdMob

Regards
Andy


#63

Want to submit a tutorial?
You want to share your knowledge with all other users? Awesome! Just visit the link, login to your account and start writing! You also can save drafts, so there is no need to rush!

Submit a tutorial on Shatter-Box.com

Thank you for your help!

We’ll check and publish the tutorial on shatter-box.

Regards
Andy


#64

I’m not using any cocoon’s plugin. I’m just using cranberry’s plugin (iap/chartboost/revmob/socialxsharing/game). is it necessary to include them in the plugins panel? If yes, how can I do it? I’ve to include one by one?
Thanks for any help.


#65

Hi @RBB

This depends on the Cordova Plugin. Some need Core Plugins (like the Cordova Dialog Plugin) others need GIT-Repo URLs.
You just need to go to your Setting - Plugins page and perform following steps.

  1. Select the “Custom” tab (for non-core plugins)
  2. Insert the Github Repo URL (it’s the github url + “.git”)
  3. Click on Install

You find the repo urls here
https://shatter-box.com/knowledgebase/cocoonio-how-to-build-a-game-using-construct-2/#document-14

Or additionally in your “additionals.xml” file which you get after the C2 export (Cordova).

Regards
Andy


#66

Thanks, Andy.

I achieved. My problem now are the ads that don’t appeared when I’ve checked the apk. I included all plugins as you showed me how and the script is okay because I’ve a iOS version built in XDK that works normally. Do you have any suggestion?


#67

Hi,

you’re welcome. Last time I tested the Cordova AdMob plugin it didn’t work with Canvas+ but with WebView+. So there are three ways how to solve it.

  1. Use the offical Cocoon AdMob plugin (in my opinion the best choices)
  2. Use WebView+ for your game
  3. Aks cranberrygame to fix it (I already did that here: https://github.com/cranberrygame/cordova-plugin-ad-admob/issues/8)

Regards
Andy


#68

Sorry, I forgot to say that I’m using chartboost and revmob (rewarded videos).


#69

Oh sorry. I’m using Chartboost as well and it works fine on my end.
What does exactly happen? Are no ads shown?
Have you checked if the “On AD preloaded” will be triggered at all?

You can download a free chartboost example for Construct 2 over here: https://shatter-box.com/knowledgebase/cocoonio-how-to-build-a-game-using-construct-2/#document-16 (scroll down)

If it still doesn’t work, you can send me your capx file in a PM and I’ll check the code then.

Regards
Andy


#70

Is it necessary to include parameters in chartboost/revmob plugins (android app id / android app signature for example)?

I’m also having some resolution issue. My app has 854x480 and I normally use “letterbox scale mode” (sometimes I use a"request fullscreen" action together). When I tested my game, the app was not vertically centered (was on top) and I could see the background of my app with some objects that are out of screen and that will be animate later. I always use this configuration inclusively in the iOS version that is regular.


#71

Yes you must provide those ID’s otherwise it won’t work.

About Scaling
On CocoonIO only those two scaling methods work

  1. Scale Inner
  2. Scale Outer

If you use an unsupported method, it will fall back to scale outer. That’s why you see the background. If you want to center something (like an UI), set Parallax to 0,0. I personally recommend the game resolution (WindowSize in C2) 1280, 800 px (16:10). Also make your Layout bigger than the WindowSize (so, if the game Scales Outer, you don’t see something “from the backend”, like unused objects or something like that.

I wrote an ebook for that, if you want to learn the basics about C2 and CocoonIO.
Construct 2 - Quick Starter Guide


#72

I didn’t know if it was clear when I asked about the parameters. I was talking about the cocoon plugins setup. I know that I have to insert this information in the cranberry’s plugins properties.

On the other hand, I never used Cocoon and this is the reason that I’m having this issue. As my game is ready, I don’t want to change its resolution for while. My other problem is that my game has boundaries and I cannot change it. The “letterbox” is perfect for this kind of game. In this case, how could I fix it?


#73

Sorry for the missunderstanding. What parameters did you mean exactly? Can you provide a screen shot?

At the moment only the official plugins like Google Play Social API & GameCentrr need a parameter.
For Cranberrygame’s plugin you must check his installation guide (mostly on the github page).
If it needs a parameter in Intel XDK, then it also needs it in Cocoon.

You cannot avoid to use Scale Outer in Cocoon, expected you use Scale Inner.

If you don’t want to change the WindowSize, then build the layout bigger. So if it scales outer you will see still parts of the Layout, not a black bar.

Regards
Andy


#74

Updated!
I just have updated the docs for the CocoonInApp plugin.
You can find it here: https://shatter-box.com/knowledgebase/cocoonio-how-to-build-a-game-using-construct-2/#document-12

If something is still missing, let me know.

Regards
Andy


#75

Udpated!
Guide added to publish your game on iTunes!


#76

IMPORTANT
I have completely revamped Shatter-Box. If you find any dead links, please let me know. I also will focus now on tutorial writing :slight_smile:

So keep shatter-box in sight :slight_smile:

Thank you!


#77

Cant even open the project in this web :confused:


#78

What project do you mean?


#79

Hi there is some update on the way for these plugins? they are more than 3 years old… and many things have changed… is there any support plan?