Jump to content

Why game sometimes blinks while running in cordova webview?

Recommended Posts

You can look at this topic: http://www.html5gamedevs.com/topic/25507-phaserwebgl-flickering-on-chrome-for-android-v53/

Setting preserveDrawingBuffer worked well, but for some devices, as I was reported by friends, it means big slowdown. Flickering is not caused by browser, but appears on devices with certain GPU. Here is list:

Mediatek MT6582

List probably is not complete, so It would be good to add next GPUs if discovered.

You can detect GPU on device like this: https://gist.github.com/cvan/042b2448fcecefafbb6a91469484cdf8 - I did not test it yet, but I am about to, as I have to make changes into one of our games. If you detected "bad" GPU, solution for Phaser 2 was to start game in Canvas rendering. Unfortunately Phaser 3 (3.11.0) is not ready for this yet. There are some fatures currently not supported in Canvas (tint - I added issue on GitHub with solution to support it at least for BitmapText - https://github.com/photonstorm/phaser/issues/3855 or at blog: http://sbcgames.io/category/blog/) and some are not working (RenderTexture - issue from yesterday - again with solution: https://github.com/photonstorm/phaser/issues/3862)

So, you have two options:
 - use preserveDrawingBuffer and some devices may be really slow,
 - switch to canvas for some devices. If you do not need tint or render textures, you are happy and can switch without fixes. Otherwise, you may apply fixes and make your build.


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...