how to make the game not pause if you change tabs.

disableVisibilityChange in phaser 3 not work

Not possible. The browser will stop running the game loop if the user switches tabs. disableVisibilityChange is a Phaser 2 feature that, as far as remember, disables the default behavior of pausing if the tab loses focus. This is different from changing the tab completely.

Forcing the game loop to use timeouts instead of animation frames could be used as a workaround, but the browser will still throttle them, creating unpredictable behavior. The best solution is to design your game such that it can still run after being paused.

1 Like

Is there any possible way to keep the game loop running even while tab focus is changed in Phaser 3?
I really need this for my Multiplayer game.

No, if the browser suspends the tab there isn’t anything Phaser can do.