Anyone know if there’s a performance differences between using single sprites and combining them into one spritesheet? I am using latest c++ cocos3.9
Thanks in advance!
Anyone know if there’s a performance differences between using single sprites and combining them into one spritesheet? I am using latest c++ cocos3.9
Thanks in advance!
Ray Wenderlich wrote a tutorial in 2013:
Although the tutorial is for the Objective-C version of Cocos-2d, the concept discussed regarding spritesheets and their impact on memory is still relevant today. In short, the main reason why people use spritesheets is because they want to reduce memory usage.
On an added note, despite Cocos Studio supports the creation of spritesheet, I still find Texture Packer the best spritesheet creator for Cocos2d-X.
Sprite sheets are still important.
I’ve created a video explaining the performance differences between sprite sheets and single sprites:
From cocos2d-x’s side:
You had to use SpriteBatchNode in older versions - you don’t need that anymore. Simply loading the sprite sheet into the SpriteFrameCache and using the frames from here is enough.