WEBGL - automatic smart batching

99 views
Skip to first unread message

sodomo

unread,
Jan 30, 2018, 3:58:05 PM1/30/18
to Phaser 3 Development
Hi guys
I'm using Phaser for commercial work for over 2 years, but lately I was thinking more often about performance issues. I was always using canvas mode, because whenever I switched to webgl, performance would drop to unplayable level. So I've done couple of tests in compassion to pixi.js. 

For test I'm loading 23 textures and creating sprites (+ webfont texts for 2nd test).

Results:
1st test: 23 textures, 100 sprites
WebGL:
Pixi.js 4.7.0 - 8 draw calls (198 calls)
Phaser 3.0 Beta 20 - 101 draw calls (409 calls)

Canvas:
Pixi.js 4.7.0 - 101 draw calls (409 calls)
Phaser 3.0 Beta 20 - 102 draw calls (810 calls)

2nd test: 23 textures, 100 sprites + 100 texts (sprite, text, sprite, text...)
WebGL:
Pixi.js - 14 draw calls (404 calls)
Phaser 3.0 Beta 20 - 201 draw calls (809 calls)

Canvas:
Pixi.js 4.7.0 - 165 draw calls (664 calls)
Phaser 3.0 Beta 20 - 202 draw calls (1710 calls)

Pixi.js is using automatic smart batching and as you can see, results are really amazing. Amazing to this point, that I'm considering switching to pixi.js all my commercial work.

Are there any plans to implementing similar solution in Phaser 3.0? I really love Phaser and new APIs are looking great, but this performance difference is a deal breaker for me.

much love!

Richard Davey

unread,
Feb 2, 2018, 5:29:03 AM2/2/18
to sodomo, Phaser 3 Development
Hi,

Do you have the tests you ran we could look at?

Even without the textures it would still be extremely useful to see how you've arranged the scene.

Cheers,

Rich

Photon Storm Ltd.

Skype: richard.davey
Twitter: @photonstorm

Registered in England and Wales.
Company ID: 8036404
VAT Number: 136 4333 27

--
You received this message because you are subscribed to the Google Groups "Phaser 3 Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phaser3-dev+unsubscribe@googlegroups.com.
To post to this group, send email to phase...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/phaser3-dev/14246379-0b84-4477-8c1a-3e0bd45e0a72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted
Message has been deleted

sodomo

unread,
Feb 2, 2018, 1:15:05 PM2/2/18
to Phaser 3 Development
Sure, no problem. Nothing fancy - just placing sprite, text, sprite, text etc. and each sprites are looping through 23 textures
http://circusmoth.com/performance-test.zip
To unsubscribe from this group and stop receiving emails from it, send an email to phaser3-dev...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages