Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering Cocos2d Cross-Platform Game Development
  • Table Of Contents Toc
  • Feedback & Rating feedback
Mastering Cocos2d Cross-Platform Game Development

Mastering Cocos2d Cross-Platform Game Development

By : Alex Ogorek
4.5 (4)
close
close
Mastering Cocos2d Cross-Platform Game Development

Mastering Cocos2d Cross-Platform Game Development

4.5 (4)
By: Alex Ogorek

Overview of this book

If you are a developer who is experienced with Cocos2d and Objective-C, and want to take your game development skills to the next level, this book is going to help you achieve your goal.
Table of Contents (10 chapters)
close
close
9
Index

File suffixes versus directories

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.png
  • btnPlay-hd.png
  • btnPlay-ipad.png
  • btnPlay-ipadhd.png

This 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.

Note

Here is a warning: if you decide to manually add files to the Published-iOS folder...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering Cocos2d Cross-Platform Game Development
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon