webdva Posted October 4, 2018 Share Posted October 4, 2018 I'm making a new video game named Strange Platformer Game. It involves trying to reach 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 Quote Link to comment Share on other sites More sharing options...
dude78 Posted October 5, 2018 Share Posted October 5, 2018 Hello. There is one problem with this game. You can see the answer here: webdva 1 Quote Link to comment Share on other sites More sharing options...
webdva Posted October 5, 2018 Author Share Posted October 5, 2018 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. Quote Link to comment Share on other sites More sharing options...
dude78 Posted October 5, 2018 Share Posted October 5, 2018 @Webdva, no. The screen flickers even when I don't record the video. webdva 1 Quote Link to comment Share on other sites More sharing options...
webdva Posted October 5, 2018 Author Share Posted October 5, 2018 (edited) @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 October 5, 2018 by webdva Changed my mind. Quote Link to comment Share on other sites More sharing options...
Tom Atom Posted October 8, 2018 Share Posted October 8, 2018 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; } webdva 1 Quote Link to comment Share on other sites More sharing options...
webdva Posted October 8, 2018 Author Share Posted October 8, 2018 @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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.