Cocoon Troubleshooting & Fixes

Troubleshooting

This page contains known issue and ways how to fix those. If you are facing any unlisted issues, don’t hesitate to let us know here or via a comment.

Fullscreen Scaling

If your game window size is only about 1/4 of your device screen size, please check following fixes.

Image made by ArcadesIndo Games

Image above submitted by ArcadesIndo Games. Thank you!

This issue can be caused by two things (if you are using the latest version of c2 you can directly check the “Check your C2 scalling stettings” tab below.

Please note...

There are several ways how to fix the scalling issue. You can click through them and check if they are working for you.

Check your C2 scalling stettings

If the issue still appears even with the latest version of C2, please check your settings in C2.

c2_settings

  • Fullscreen scaling: High quality
  • Use high-DPI display: Yes
  • Enable WebGL: On

Also uncheck “Minify Script” at the export window.

Update c2runtime.js

Oh no, a bug...

This is an unfixed bug! If you still have the issue that the game is 1/4 of the screen size, please do this after each export.

Open your c2runtime.js file and search for “this.canvas.height = Math.round(h * dpr);”. Then add into the if condition “|| this.isCocoonJs” (see code below).

if (this.canvas)
{
this.canvas.width = Math.round(w * dpr);
this.canvas.height = Math.round(h * dpr);
if (this.isEjecta || this.isCocoonJs) //maybe this is better (Ask Ashley): if (this.isDomFree)
{
this.canvas.style.left = Math.floor(offx) + "px";
this.canvas.style.top = Math.floor(offy) + "px";
this.canvas.style.width = Math.round(w) + "px";
this.canvas.style.height = Math.round(h) + "px";
}
else if (this.isRetina && !this.isDomFree)
{
this.canvas.style.width = Math.round(w) + "px";
this.canvas.style.height = Math.round(h) + "px";
}
}

Black Screen Issue

At the moment there are several things causing the ‘Black Screen’ Issue.

  • Physic Objects
  • Construct 2 Splash Screen
  • Minifing of the script during export

Physics Engine

Set ‘Physics Engine’ to ‘Box2D web’.

cio_physics_engine

Construct 2 Splash Screen

Somehow the new Construct 2 Splash Screen doesn’t work with cocoon.io, so deactivate it.

cio_splash_screen

Minifing of the script during export

minify_script

I have forgotten once to uncheck the minify script checkbox and I got following error.

Error_CocoonIO_minify

Then I unchecked it and it worked without any errors.

White/Black Screen on iOS

With the update of Construct 2 to version r224 a new issue came up. This only happens on iOS and WebView(+). The issue has been reported to Scirra.

  (Scirra) Bug Report
Fixed!

This issue was fixed with version r227!

The fix

Just open your c2runtime.js file and search for

this.isWKWebView = !!(this.isiOS && this.isCordova && window.indexedDB);

then replace this line with following one.

this.isWKWebView = !!(this.isiOS && this.isCordova && !this.isCocoonJs && window.indexedDB);

You must do this after each export!

Slow Loading

If you have any issues with slow loading perform following steps.

  1. Export via Cordova
  2. Open the ‘c2runtime.js’ file with an editor of your choice
  3. Search for the following line

img_["cocoonLazyLoad"] = true;

 

and replace it with this one.

img_["cocoonLazyLoad"] = false;

 

cio_slow_loading

Just to be sure...

Note, that you have to do this after each export until it is fixed by scirra.

Only one Person in Leaderboard

When you open the leaderboard and only one person is shown, try to disable the “tamper protection”.

cio_gpg_fix_only_one_person

Then wait a few hours and check it again. It should work after that change.

No audio on iOS

Some user are having trouble with no sounds on iOS. Please, check following points to avoid this issue.

  • Remove the “Media” plugin, if installed in Cocoon
  • Check both checkboxes for “Export audio files for” on the export window in Construct 2 (see image below)

 

 

Updated on September 2, 2017

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.