scofieldly Posted August 3, 2017 Share Posted August 3, 2017 Hi all, I want to ask how to limit the fps, I tried set this.game.time.fpsMax = 30, but it does not work at all and I tried to set desiredFps to 20, and I can saw the animations become slower(it should be worked) but when I display the fps value, it still display 50-60 although I set desiredFps and it seems work so anyone know how to set the max fps value and make the display fps value also be the actual value, thanks Link to comment Share on other sites More sharing options...
samme Posted August 3, 2017 Share Posted August 3, 2017 Time#desiredFps is the right way. desiredFps is really the update rate. Phaser always renders one frame per animationFrame, which is usually 60fps. Link to comment Share on other sites More sharing options...
scofieldly Posted August 4, 2017 Author Share Posted August 4, 2017 6 hours ago, samme said: Time#desiredFps is the right way. desiredFps is really the update rate. Phaser always renders one frame per animationFrame, which is usually 60fps. thx for reply, buy after I set the desiredFps to 30, game.time.fps still shows 60, do you meet the situation? Link to comment Share on other sites More sharing options...
samme Posted August 4, 2017 Share Posted August 4, 2017 You can't control game.time.fps directly. It's actually the rate Phaser is receiving animation frames from the browser. It will always be ~60 if the game is performing normally. Link to comment Share on other sites More sharing options...
scofieldly Posted August 6, 2017 Author Share Posted August 6, 2017 On 2017/8/4 at 11:08 PM, samme said: You can't control game.time.fps directly. It's actually the rate Phaser is receiving animation frames from the browser. It will always be ~60 if the game is performing normally. ok, I see, so do you know is there any method can provide me the REAL fps data (like: if the desitedFps = 30, the display fps should not higher than this number), thanks Link to comment Share on other sites More sharing options...
Recommended Posts