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 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.
Check your C2 scalling stettings
If the issue still appears even with the latest version of C2, please check your settings in C2.
- Fullscreen scaling: High quality
- Use high-DPI display: Yes
- Enable WebGL: On
Also uncheck “Minify Script” at the export window.
Update c2runtime.js
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).
[js]
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”;
}
}
[/js]
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’.
Construct 2 Splash Screen
Somehow the new Construct 2 Splash Screen doesn’t work with cocoon.io, so deactivate it.
Minifing of the script during export
I have forgotten once to uncheck the minify script checkbox and I got following error.
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.
[creativ_button url=”https://www.scirra.com/forum/issue-with-wkwebview-on-ios_t171504″ icon=”stethoscope” label=”(Scirra) Bug Report” colour=”green” colour_custom=”” size=”medium” edge=”rounded” target=”_blank”]
The fix
Just open your c2runtime.js file and search for
[js]this.isWKWebView = !!(this.isiOS && this.isCordova && window.indexedDB);[/js]
then replace this line with following one.
[js]this.isWKWebView = !!(this.isiOS && this.isCordova && !this.isCocoonJs && window.indexedDB);[/js]
You must do this after each export!
Slow Loading
If you have any issues with slow loading perform following steps.
- Export via Cordova
- Open the ‘c2runtime.js’ file with an editor of your choice
- Search for the following line
[js]img_[“cocoonLazyLoad”] = true;[/js]
and replace it with this one.
[js]img_[“cocoonLazyLoad”] = false;[/js]
Only one Person in Leaderboard
When you open the leaderboard and only one person is shown, try to disable the “tamper protection”.
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)