Chapter 6. Rendering Text
Displaying text in games is almost as important as displaying images and animations. In fact, some time ago many games were purely text-based. We're not going to go hardcore and make the player type "shoot 30 degrees" and get the "you've missed the bird" message as a result, but the game will definitely benefit from adding some text.
In this chapter, we are going to review the following topics:
- Adding text to the game using True Type font labels
- Updating labels, text, and performance considerations
- Creating and using bitmap fonts
- Using actions to create text effects
The easy way – CCLabelTTF
We've already used the CCLabelTTF
class to display the text on the screen. It was pretty easy, wasn't it? We only specified the font ...
Get Learning iPhone Game Development with Cocos2D 3.0 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.