-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Mastering Cocos2d Cross-Platform Game Development
By :
When Cocos2d and SpriteBuilder became integrated in Cocos2d 3.0, they changed the way textures are read in by Cocos2d. In previous versions, if you wanted to make a game for the iPhone and the iPad, you had to add various suffixes to your file. For example, if your image was named btnPlay.png, you had to create variously sized files in your project, which were named as follows:
btnPlay.pngbtnPlay-hd.pngbtnPlay-ipad.pngbtnPlay-ipadhd.pngThis methodology of getting your files saved is typically referred to as using file suffixes.
In the newer iteration of Cocos2d with SpriteBuilder, one of the ways you can manage your textures is by dragging a file of the largest possible size (for example, Retina iPad) into SpriteBuilder. When you click on Publish, SpriteBuilder will take care of the file size variations for you. This way of handling files is referred to as using directories.
Here is a warning: if you decide to manually add files to the Published-iOS folder...
Change the font size
Change margin width
Change background colour