Disable WebGL Rendering During Runtime?

0 favourites
  • 6 posts
  • Dear community,

    I was having a thought about WebGL (as you do) and wandered what the expert opinion is on this matter. I did a forum search and couldn't find anything about this, so please accept my apologies if this is duplication of a previous thread.

    I would like to be able to ensure that players of my games don't suffer from game slowdowns / jerky rendering. I find that my games typically run more smoothly when WebGL is turned off, contrary to the popular advice to leave it turned on. Chrome runs my games very well but I don't think that all game players can or want to use chrome. The slow rendering is so bad that my LD29 entry runs appallingly badly in IE 11 with WebGL enabled (at 5 to 6 fps!!) whereas when WebGL is turned off it runs smoothly at 60 fps. My game has no WebGL shading effects anywhere....

    As WebGL rendering is the preferred option, would it be possible to add a feature to enable us to turn WebGL rendering off during runtime? Then I could add a check for low fps to then disable WebGL in the hope that that might improve things. With good design a game should run well on most browsers but it seems that there is no way to realistically support IE on low-end machines without this option. Of course, I would have to detect a low framerate for a period of time for this check to be valid - it would serve no purpose if the slowdown was just for one frame! Is this do-able or am I just demonstrating my lack of understanding how javascript works?

    Thanks,

    Ed

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No, it's not possible to change renderer at runtime. I would be interested to see any examples of games running slower in WebGL mode if you could share them. I've run several pretty different tests and it can often double the framerate or more on some systems and is never significantly slower.

    If you're *only* seeing slow rendering in IE11, it's probably using a software renderer, which is likely unique to your system due to buggy graphics card drivers. Try updating them.

  • Ashley - super quick response - thanks! I can confirm that the only measurable slowdown is when I use IE11. It could be that my 5 year old laptop, which was once state-of-the-art, is now a bit too legacy to run webgl well (the driver is < 1 year old, but it only has 512 Mb of vram...).

    I was wandering if there was a way to mitigate for other users who might have old hardware / be using IE11 - but I guess not.

    Thanks.

  • Ashley - super quick response - thanks! I can confirm that the only measurable slowdown is when I use IE11. It could be that my 5 year old laptop, which was once state-of-the-art is now a bit too legacy to run webgl well (the driver is < 1 year old, but it only has 512 Mb or vram...).

    I was wandering if there was a way to mitigate for other users who might have old hardware / be using IE11 - but I guess not.

    Thanks.

    If by any chance you're hosting the game on your own website, then you could use script that detects browser and loads adequate page with version of the game for that browser.

  • megatronx - that sounds like a simple and elegant solution to the problem. I'm afraid that I'm still a noob when it comes to scripting (noob actually implies that I have some ability and I'm just starting - that might be a bit of an exaggeration)... One day I'll be better...

  • megatronx - that sounds like a simple and elegant solution to the problem. I'm afraid that I'm still a noob when it comes to scripting (noob actually implies that I have some ability and I'm just starting - that might be a bit of an exaggeration)... One day I'll be better... <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    there you go. Just follow the instructions. http://www.pontikis.net/tip/?id=27 if for some reason this wouldn't work, then just look in google for "detect browser jquery script". <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> Any other problems then pm me.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)