O'Reilly logo

Learning iPhone Game Development with Cocos2D 3.0 by Kirill Muzykov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required