The approximate understanding of Sprite sheet

Source: Internet
Author: User

Sprite sheet is a method of merging multiple sprites into a single file. This reduces the size of the entire file relative to placing each sprite in a separate folder. This means that you will greatly reduce memory usage, file size, and load time.

In addition, to achieve better performance through batching, we must use the sprite Sheet.

When using sprite sheet, first load it into SpriteFrameCache . SpriteFrameCacheis a cache class that is saved SpriteFrame so that we can access it quickly SpriteFrame . SpriteFrameis an object that contains the image name and a specific sprite size ( Rect ).

SpriteFrameCacheYou can avoid multiple loads SpriteFrame . SPriteFrameload only once and be saved SpriteFrameCache in.

In my understanding, is Spriteframecache is the software or the program itself, and Spriteframe class is that *.plist itself, is through the Spriteframecache to load/Save the sprite Frame.

Reference website: http://cn.cocos2d-x.org/tutorial/show?id=1989

The approximate understanding of Sprite sheet

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.