Jump to content

60FPS on mobile and Phaser


bapho
 Share

Recommended Posts

I'm doing something on Phaser on mobile phones at the moment and am wondering if minimum 60FPS performance is really necessary on mobile devices? Is there any way to play with a lower FPS (maybe down to 30) without the obvious jittering, maybe by forcing a cap on the FPS to a lower average?

Link to comment
Share on other sites

60 FPS should always be your target as thats generally the refresh rate for browsers, although many games can get away with as low as 30 FPS (or possibly less for some games).

 

Depending on how your are structuring your renders (does Phaser impose this? I'm not sure) you can choose whatever fps you like as so long as everything keeps up you'll get it.

 

A naive solution using `setInterval` for your tick would look something like:

var FPS = 30function render() { ... }setInterval( render, 1000 / FPS )

I'd still advocate using `requestAnimationFrame`, which calls every 16.6ms if it can, but skip every other call (or do some maths to work out which calls to skip if you want different framerates).

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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