Jump to content

Massive performance degredation with Phaser 2.4


Preece
 Share

Recommended Posts

I just tried upgrading from 2.3.0 to 2.4.0 (and 2.4.2). it caused the performance of my game to basically bottom out at 1 FPS. With Phaser 2.3 I get 60 FPS pretty easily.

 

I've investigated a bit, and it seems that the objects preUpdate is now consuming an obscene amount of time. The game contains a large multi-layered map with a lot of enemies all over it. I currently have a system that will disable the enemies body and bail out of their update function if they are on a different layer or outside of the camera. I suppose some change modified what happened in the preUpdate for the sprites or their bodies and now is being called for every enemy and object anywhere on the map.

 

The collision calls also seem to be significantly slower for some reason. When I remove all objects, the performance is still shaky. Only when I remove both all objects and prevent any collision from happening does the performance return to where it was.

 

Also, a problem from earlier versions of Phaser seems to have returned. The performance takes a massive hit when moving through a tilemap, vs standing still. 

 

Is anyone else using large tile maps, with many objects, experiencing this performance problem? Any ideas on what is the cause? Thanks.

Link to comment
Share on other sites

  • 4 months later...

Hi Preece. Sorry for the delayed response but I am having exactly the same issue after upgrading a game from 2.2.2 to 2.4.4

 

I'm a bit at a loss to fix it. My map is 96x96 with 2 layers and collisions on specific tile ranges on one of those layers.

 

Performance dropped from 55-60 fps to ~5-15.

 

I know this response is coming in months later. Did you ever figure out a solution?

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...
 Share

  • Recently Browsing   0 members

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