rado9408 Posted September 13, 2018 Share Posted September 13, 2018 I have started using phaser 3 as a game development library, but sometimes I am facing some huge problems , for example, not playing animations on the background mode. When I am switching the tab the animation is starting to play. My expected result is to play animations on the background mode. Is there any solution for this or is there any other solution beside playing animations ??? Link to comment Share on other sites More sharing options...
rich Posted September 13, 2018 Share Posted September 13, 2018 If you switch tab, or minimize the browser, or even just cover the browser window up with another app, then the browser will start to slow anything using Request Animation Frame down, and eventually, it will stop updating it completely. It does this automatically, it's nothing to do with Phaser and you cannot prevent it. All you can do is detect if it happens and code your game in such a way that you deal with it when you return. If this means fast-forwarding animations ahead to make up for the 'lost' time, then so be it, but that's your call, there is no way Phaser can do it for you. blackhawx 1 Link to comment Share on other sites More sharing options...
Recommended Posts