Preece

Massive performance degredation with Phaser 2.4

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.