gsus7125 Posted October 25, 2018 Share Posted October 25, 2018 In Phaser 2 it was just game.stage.disableVisibilityChange = true But I can't find the solution in Phaser 3, does anyone know? I searched but could not find anything. Thanks. It is a multiplayer game and one of the players updates everyone else on the state of the game so I can't have that player pausing. Someone told me you can't even do that, but Phaser 2 had it so how can that be? Link to comment Share on other sites More sharing options...
rich Posted October 25, 2018 Share Posted October 25, 2018 You can't do it, and Phaser 2 can't do it either. It's entirely up to the browser if it thinks the tab is no longer active (i.e. switching away), so it will slow down, and then stop, any running scripts relying on setTimeout or raf, which in effect pauses your game. Phaser 3 actually never pauses automatically (aside from audio, the main loop never stops). The solution is to capture when it happens and recover gracefully from it (just like you'd need to in v2, or any other framework) webdva 1 Link to comment Share on other sites More sharing options...
Recommended Posts