Jump to content

Are there any drawbacks to using these 2 Phaser variables?


toto88x
 Share

Recommended Posts

Hi,

I recently discovered 2 Phaser variables that are really interesting.

// Improve performances
game.forceSingleUpdate = true;

// Prevent blurry text
game.renderer.renderSession.roundPixels = true;

But I'm wondering... are there any drawbacks in using them? If not, why aren't there set to true by default?

Thanks!

Link to comment
Share on other sites

There's no drawback to roundPixels, it just depends what visual style you're after. Sometimes sub-pixel aliasing is really important, other times not.

forceSingleUpdate is very much device (and game) specific. It's an unbounded game loop, so basically it will update as fast as the device can manage, with no handling for dropped frames. It doesn't technically improve performance, in that your game isn't suddenly handling more objects than before, it just doesn't normalise the frame rate.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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