webdva

[WIP] Strange Platformer Game

Recommended Posts

I'm making a new video game named Strange Platformer Game.

Punishing unicorn

It involves trying to reach the next level.

Toward the next level

I'm really passionate about this game and I want to work together with you, the player, to make this a great game. Many more levels and features are being planned, but I would love to receive feedback from you to make sure the game is heading in the right direction.

https://webdva.itch.io/pantsu-versus-baka

Share this post


Link to post
Share on other sites
3 hours ago, dude78 said:

Hello.

There is one problem with this game. You can see the answer here:

 

Thank you for your help.

So, what you're saying is that, when someone tries to record gameplay, the resulting recording flickers when the game.preserveDrawingBuffer value is set to false and that the value should instead be set to true to prevent flickering when recording the gameplay? In that case, then, I will create an options screen that will allow the player to set the game.preserveDrawingBuffer value.

Share this post


Link to post
Share on other sites

@dude78, very well then.

Then I may have to have the game.preserveDrawingBuffer value set to true on default. I'm not entirely sure, but setting it to true makes the game even slower. If I'm not mistaken, I believe that the flickering (as well as the slowness) occurs only on old or low-end devices, though. And I do intend to support those types of devices so as to not leave them out.

Nonetheless, thank you again for your help.

EDIT: Never mind, I just changed the variable to true and it works well on itch.io.

Edited by webdva
Changed my mind.

Share this post


Link to post
Share on other sites

setting preserveDrawingBuffer to true works, but it has impact on performance on some devices - see this thread:

It looks like flickering is related to specifis GPUs. So, you can make test for GPU in your game and set preserveDrawingBuffer accordingly. This is snippet from one of our games:

        public static getRenderer(): number {

            let badGPUList = [
                /.*Mali.400.*/i,
                /.*Mali.450.*/i,
                /.*Mediatek.MT6582.*/i
            ];

            // from:https://gist.github.com/cvan/042b2448fcecefafbb6a91469484cdf8

            let canvas = document.createElement('canvas');
            let gl: WebGLRenderingContext;
            let debugInfo;
            let renderer: string;

            try {
                gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
            } catch (e) {
                return Phaser.AUTO;
            }

            if (!gl) {
                return Phaser.AUTO;
            }

            debugInfo = gl.getExtension('WEBGL_debug_renderer_info');
            if (!debugInfo) {
                return Phaser.AUTO;
            }

            renderer = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL);

            console.log("renderer: " + renderer);

            for (let i = 0; i < badGPUList.length; i++) {
                let badGPURegEx = badGPUList[i];
                if (badGPURegEx.test(renderer)) {
                    console.log("In bad GPUs list => render to CANVAS");
                    return Phaser.CANVAS;
                }
            }

            return Phaser.AUTO;
        }

 

Share this post


Link to post
Share on other sites

@Tom Atom, thank you very much for your help and for sharing that code snippet.

I'll do what you suggested, seeing which GPUs the game performs badly on and make the game use Canvas instead of WebGL for them and set game.preserveDrawingBuffer accordingly.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.