icp Posted October 19, 2016 Share Posted October 19, 2016 I'm using Phaser v2.6.2 . In my code, I use looping timers created with : this.game.time.create(); The timers callbacks / functions are working as expected on desktop which runs at 16 ms / 60 FPS. The issues appear on mobile which runs at 18 ~ 20 ms / 50 ~ 54 FPS. The timers seem to skip some function calls while looping. I've found a solution to this problem: this.game.forceSingleUpdate = false; Now the timers behave as expected on mobile devices but the overall feel of the game is slow / lag / jagged . So I need to use both timers and : this.game.forceSingleUpdate = true; I'm not able to find a solution to this even though I've spent a few days looking into the Phaser core ( Game.js and Timer.js ). I think I need to find a way to synchronise timers with the logic update. Link to comment Share on other sites More sharing options...
samme Posted October 19, 2016 Share Posted October 19, 2016 Hi icp, what is the loop interval? Some drift is normal but it's weird if calls are getting skipped. On slower devices you could try forceSingleUpdate and reduce desiredFps to 30. Could you use loop events instead of separate timers? If you have to use timers, make sure you're not creating more than you need. Link to comment Share on other sites More sharing options...
icp Posted October 19, 2016 Author Share Posted October 19, 2016 I have two timers. One runs at 1000 ms and another at 2200 ms. I'm arleady using loop events. I would not like to limit the performance at 30 FPS since besides this minor issue everything runs smooth. Link to comment Share on other sites More sharing options...
Recommended Posts