Preece Posted August 8, 2015 Share Posted August 8, 2015 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. jdnichollsc 1 Link to comment Share on other sites More sharing options...
BrenX Posted December 30, 2015 Share Posted December 30, 2015 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 More sharing options...
Preece Posted January 16, 2016 Author Share Posted January 16, 2016 Hi BrenX, unfortunately I did not find a solution. I just decided to stay with 2.3. Link to comment Share on other sites More sharing options...
Jackolantern Posted January 16, 2016 Share Posted January 16, 2016 Have you guys been able to pinpoint the exact function call that is not working? How are you determining if an enemy is off-camera? Link to comment Share on other sites More sharing options...
s4m_ur4i Posted January 17, 2016 Share Posted January 17, 2016 is there any example code? also noticed performance gets low when two(2) layers are registered. but never had a framerate this low. Link to comment Share on other sites More sharing options...
jorge.graca Posted February 12, 2016 Share Posted February 12, 2016 Hi, I have the same issue when I do //this.stage.preUpdate(); on the UpdateLogic the game runs smooth but when added it spikes a lot. I have no physics in my game, why does this happen? Link to comment Share on other sites More sharing options...
Recommended Posts