Jump to content

Phaser can render less sprites at 60fps than pixijs


Cictani
 Share

Recommended Posts

Hi,

 

noticed that if I use phaser my system can only render around 5000 sprites at 60fps while if I use pure pixijs (latest version not the one included with phaser) it can render around 30000 sprites at 60fps.

 

I wonder why phaser is so slow compared to pixijs?

Link to comment
Share on other sites

It isn't comparing like with like. Phaser's renderer is based on Pixi 2. Pixi 3 is structured quite differently and isn't used in Phaser. Phaser 3s dev log shows that it will have its own renderer. When it's out, a comparison might be fairer although I'd imagine it depends what you are doing. Pixi is more general purpose, Phaser is for games. Different overheads and efficiencies may dominate depending on your task.

Link to comment
Share on other sites

Have a look at the Phaser 3 demos on the blog. I don't think phaser's render methods directly equate to Pixi's, but work is being done in that area to improve performance 

 

 

I will do so.

 

5000 sprites is plenty though... no?

 

Yep, but 

 

  • for my test I only move the sprites around the screen and don't have any additional game logic. If I added more logic it will further slow down
  • I did not test it on a mobile device but the number of sprites which are rendered at 60 fps will further decrease.
  • On mobile less cpu time means longer battery life. Even if you only need 200 sprites the program will consume less power if you use pixi 3.
It isn't comparing like with like. Phaser's renderer is based on Pixi 2. Pixi 3 is structured quite differently and isn't used in Phaser. Phaser 3s dev log shows that it will have its own renderer. When it's out, a comparison might be fairer although I'd imagine it depends what you are doing. Pixi is more general purpose, Phaser is for games. Different overheads and efficiencies may dominate depending on your task. 

 

 

Oh I didn't know that I thought Phaser also uses some kind of modified pixi 3. I will check out Phaser 3.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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