vancura Posted December 8, 2013 Share Posted December 8, 2013 Hi, Is there a way to batch sprites together to save precious drawcalls (mainly on devices) when they originate from the same sprite sheet? From what I see it seems atlases are used only as sources of bitmaps, they don't batch sprites together. Or am I wrong? Is there any other way in Phaser? Sorry if I missed it somewhere in docs, examples or here on forum, but I completely failed to find any bit of the information.Thanks! Link to comment Share on other sites More sharing options...
rich Posted December 8, 2013 Share Posted December 8, 2013 Are you referring to WebGL batching? (which Pixi does do internally, and thus Phaser does as well) or something else? Link to comment Share on other sites More sharing options...
vancura Posted December 8, 2013 Author Share Posted December 8, 2013 Let me show you a snippet: https://gist.github.com/vancura/7856773 I am testing the loop with CocoonJS and I can't achieve more than 20 FPS on iPad3 with just 100 sprites, while with particle emitters I can easily achieve 60 FPS. I thought there's no batching used in my test loop... Is there any way how to achieve a better framerate?Thank you! Link to comment Share on other sites More sharing options...
rich Posted December 8, 2013 Share Posted December 8, 2013 It's impossible to tell from such a small piece of code, especially if its running at the whims of CocoonJS too. Put a complete project up somewhere that can be accessed by the CocoonJS launcher just be feeding it a URL. Link to comment Share on other sites More sharing options...
Recommended Posts