Jump to content

Phaser Frame Rate


hellspawn_bg
 Share

Recommended Posts

By default, Phaser is using requestAnimationFrame, see here for an explanation - http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/. It essentially keeps the timing inline with the refresh rate of the display (normally 60fps).

 

To update more often, it looks like you could force Phaser to use timeout instead by sending the game a config option of forceSetTimeOut = true and then you could set game.time.timeToCall to a number of milliseconds less than 1000/60.

 

Depending on what you are updating, you could always do it with a separate timer outside the main game loop.

Link to comment
Share on other sites

My concern is not to call the update function more often than 60 frames per seconds, as in a lot of parts of my game I am using pre-generated data tweens at 60 frames. If the update function is called more often, let's say at 120 frames, the animation would appear faster.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...