How do I turn off WebGL in game

0 favourites
  • 9 posts
From the Asset Store
A well commented RPG game template to learn from or use as a base for your own game!
  • Hi. I'm making an 'options' menu for my game. And I would like to turn off the WebGL completely as the 'Fastest' graphic mode.

    So, is there a way to toggle WebGL in game?

  • Not in game, the runtime does different setup for webgl on/off when the runtime starts. Best you could do is two exports, one with webgl of and one with webgl off. Then when you change the option your game would cause the the url of one or the other to load.

  • Mmh, yeah, I see.

    As I may export to NW.js, I think that I'll juste make a loop that goes trough every object and deactivate its effects.

    Even so I've been in the 'profile' tab in debug mode, and it seems that what causes most lag is my blur effect on lightning and the motion blur I added.

    Anyway, thank you

  • WebGL is usually 2-10x faster than canvas2d, so I don't know why you would want to turn it off...

  • Ashley

    Yep, as I said, what was really making the game laggy was the blur on lightning and the motion blur.

    Deactivating one of the two would give me some extra FPS and deactivating both would give me back my 60FPS, so I think that's what I'll do .

    Thank you anyway!

    (Btw, I found a way to put two events in the same box even if they shouldn't be. Like the "Trigger once while true" and "On function" and so on. For the moment, it helps me doing some things and don't seem to be creating any bug or glitch, so I would rather say it's a tip and trick, but, if it happened that it may cause any problem, here is how I did it:

    Anyway, that's still useful if a function is called in multiple following frames, like on a "Is key pressed" condition:

  • skymen - please report any problems to the Bugs forum following all the guidelines, otherwise the issue will be forgotten.

  • WebGL is usually 2-10x faster than canvas2d, so I don't know why you would want to turn it off...

    on android yes

    on ios no

  • It should be faster on iOS too - the 2-10x faster figure I gave is after testing over a wide range of platforms including iOS, and I have data to back it up. Have you seen performance issues on iOS?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It should be faster on iOS too - the 2-10x faster figure I gave is after testing over a wide range of platforms including iOS, and I have data to back it up. Have you seen performance issues on iOS?

    for android it's okay ... we can see clearly the difference between export to android and export to crosswalk (webgl enabled)

    but on ios ... i see the opposite ... when i disable webgl i get better results than enabling webgl

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