How do I remove the flickering splash when using CocoonJS?

0 favourites
  • 1 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • Hello everyone,

    Due to the increasing amount of users demanding a solution for the blinking logo, we have decided to create this new post in order to explain all of you a workaround to remove that flickering.

    The flickering issues are related to how Construct2 handles CoccoonJS screencanvas mode on the splash scene. ScreenCanvas is an optional to use specific high performance canvas. It renders directly to the screen buffer without creating an offscreen buffer. This allows huge rendering performance improvements in some GPUs and it also consumes less memory. When using screencanvas is very important to render the whole screen every frame, because android's GLSurfaceView internally performs a swapBuffers operation although nothing is drawn on a frame. Construct2 doesn't redraw the surface while loading resources on splash scene, that's why flickering is happening.

    Flickering issues can be avoided disabling screencanvas and using a normal canvas. Keep in mind that it may affect performance on some GPUs. An alternative solution if you want to keep using screencanvas is to redraw the splash scene every frame while resources are loading.

    To disable Screencanvas you have to:

    • Export the project with Construct2's CocoonJS exporter.
    • Open the exported zip file.
    • Edit the c2runtime.js file and change these lines: var canvas = document.createElement("screencanvas") || document.createElement("canvas"); canvas.screencanvas = true;[/code:iw7f045w] For these ones: var canvas = document.createElement("canvas"); canvas.screencanvas = false;[/code:iw7f045w]
    • Save changes and compress the ZIP folder again.

    Once this is done, you can compile the project in the Cloud Compiler and test it on your device. The flickering Splash should have disappeared.

    About Memory Management, we will open another post in the following days as we are currently working on a workaround to improve it.


    Ludei Team.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)