I have just read this tutorial (Advanced Rendering Tutorial: Part 2 - Multi Texture Batching - Learn - Phaser) on how you can easily mess up performance in how you handle your sprites.
“[…how sprites have been] created in the display list the WebGL Sprite Batching is utterly unable to benefit from what it does. Remember that sprite batching needs consecutive sprites to share the same texture…Very often developers group the assets in their texture atlases based on the type of game element it is, rather than where it appears in the display list.”
So how exactly do I cause the order of the display list? Is it whenever I create an object with a texture (sprite, image, etc.) that this pushes the object onto the display list array?
If so, and in more practical terms, in the create function of a scene, should I load all objects ordered by their texture name?
If you don’t mind, please disregard Multi-Texturing for the moment.