Jump to content

New to Phaser...barely anything happening but having performance issues?


FryDay444
 Share

Recommended Posts

Are you using Chrome/Canary?

 

I have a similar issue of sluggishness but I cannot figure out why. At first I thought it was animations (dealing out cards in a card game) but this does not make much sense because 8 cards can be slow, while 20 is smooth. 

Link to comment
Share on other sites

Seems perfectly smooth in Safari. I checked your source files, and it looks fine. The only thing that could cause something like that might be where you multiply with physicsElapsed, which is a good practice as it ensures same speed at all frame rates, but I'm not sure physics time updates at the same rate as the frame rate since 2.2.0. It might be 0 at some frames, then 0.016 at others or even more. Physics might be running at half that of the update loop, and they run in different threads even, I believe, so if they don't match you may seem some stepping.

 

As this has all changed in 2.2.0+ I cannot tell you exactly what is going on, but try looking in the timer class for something else that physicsElapsed, or create your own timer for each "flame" and see how long has passed since last update.

 

Borderline: Don't count on physicsElapsed for things that does not have to do with the physics systems, it's implementation might change from version to version.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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