[Construct 2] Black Screen


#62

Here is a tutorial for the Cocoon C++ Box2D Bridge: Adding Cocoon C++ Box2D Physics bridge to your project


#63

The line var b2Vec2 = Box2D.Common.Math.b2Vec2 does not exist in c2runtime.js, exported Cordova to R216.

Physics engine = Box2D web
Loader style = Progress bar & logo


#64

I found out that also the ‘Minify Script’ checkbox (if enabled) can cause a black screen.
I created a Overview of all known fixes for specific issuse here:
https://shatter-box.com/knowledgebase/cocoonio-troubleshooting-fixes/

let me know if you know more, then I will add it.

Regards
Andy


#65

Game crashes if you use plugin Cocoon ads.

Action: Load an interstitial

I also tried using the condition:
If (CocconCanvasplus: Is Canvas +)
Load an interstitial

Comments:
Removed the keyboard plugins, Browser, CocconJS (old).

Leave only the plugins:
CocoonAds
CocconCanvasplus

No project is working with Canvas.
It only works if I export with CocconJS (old), but I do not know how to add the Admob.


#66

Can you send me your capx file in a PM?
I will check it on my end then :wink:

Regards
Andy


#67

I no longer have the black screen issue, but I do have a 2-3 second black screen between the Cocoon splash and my game. Anyone else getting this and know a fix? Thank you!


#68

Hi :wink:
Glad to hear that! Do you use a loader layout in C2? You can make your own loader layout in C2, and then show it, so the cap of 2-3 seconds of black screen should disappear.

https://www.scirra.com/tutorials/318/how-to-use-loader-layouts-to-make-custom-loading-screens

Regards
Andy


#69

Thanks for the quick response! That tutorial link says that native mobile apps do not show loader layouts and to use custom splash instead. To do that, do I still set UseLoaderLayout to Yes and then use my first layout with my image I want? Which loader style do I choose for that?

Thank you so much for the help!


#70

My game has 6-7 seconds BlackScreen gap between Cocoon Splash Screen and my first layout. Someone helps pls


#71

Yes exactly. The loader layout will be shown even when the game isn’t loaded completely.
So that should fill the gap

Regards
Andy


#72

Thanks! And do I leave the “Loader style” to “Nothing (not recommended)” or change it to one of the progress bar options?


#73

I always chose “Loaderbar & Percentage” or something like that, but when you use your own loader screen it’s no matter what you set :wink:

Regards
Andy


#74

Interesting. I did everything above and am still getting a black screen for 2-3 seconds. :frowning:

First layout: Loader
Loader layout: Yes
Loader style: Progress bar & logo

LoaderEventSheet:
On loader complete > Go to MainGame


#75

That’s exactly what I did. The game should show the first layout when it starts loading, so you should be able to see the first layout right after the Cocoon Splash, excepted there is a gap between the Splash and the Game (maybe resavated for the custom splash, but this should be 0 if no splash ia used though).

Can you try to add a custom Splash to your cocoon project and check if the gap is still there?

Regards
Andy


#76

Thank Andy. I followed your steps and fixed Blackscreen and the BlackSreen gap between Cocoon SplashScreen, and first Layout . Now It runs smoothly :smiley: I posted also in C2 forum, my nick name is “qngnht” who suggest to down the price of Cocoon :smiley: I upgraded to silver plan to reduce the time of wating >.<


Black Screen after Cocoon Logo (Construct 2)
#77

Can I ask other question here ? I’m using Cocoon Admob plugin, is it share the revenue from ads ? Before I use Cordova Admod Pro Plugin from github, i must pay some money not to share revenue from ads with the author of this plugin. Thank you so much.


#78

No, the revenue of any Ad plugin you use in Cocoon is yours and just yours. We don’t get any share for the use of any of the plugins that are available in the cloud.


#79

Thank imanlm1. Hi Andy, you should add your instruction of using first layout loader in C2 to avoid Blackscreen gap in the documents
https://shatter-box.com/knowledgebase/cocoonio-how-to-build-a-game-using-construct-2/#document-3
Beginners will be helped a lot.

First layout: Loader
Loader layout: Yes
Loader style: Progress bar & logo

LoaderEventSheet:
On loader complete > Go to MainGame

And need to fix these in above documents:

  • “org.crosswalk.engine”
  • “cordova-plugin-whitelist”
  • “org.apache.cordova.inappbrowser”

Keeps the “gap” in these plugin, if changing these plugin into “cocoon” I can’t save config.xml on Cocoon.io to build.
Thank you for helping me a lot ! ^ ^


#80

Thank you, I’ll add that :wink:

You had to delete the config.xml file before you had uploaded your first project to cocoon.
So just go to your xml file and delete the line with the crosswalk engine plugin and the cordova inappbrowser plugin.
You can uninstall the Whitelist plugin from the plugin section -> Installed.

Regards
Andy


#82

My first layout is a loader layout that has very little objects and code. Is this considered the custom splash screen or is that something else?

First layout: Loader
Loader layout: Yes
Loader style: Progress bar & logo

LoaderEventSheet:
On loader complete > Go to MainGame