Auto set Canvas or WebGL based on FPS

Some of my users (mainly on higher end devices) get higher fps on my game when using WebGL. The rest of my users (mainly on lower end devices / mobile devices) get better fps using Canvas.

I am wondering if there is a way to test the fps of both canvas and webgl, and set the default to the higher one. I can figure this logic out myself, the root question I have is that I want to change from Canvas to WebGL (or vice versa) while a user is in game, without having to reload the page. Is this possible in Phaser?

Thanks

You can’t change the renderer once the game has booted, but you could destroy one game and create another.

1 Like