O'Reilly logo

Cocos2d for iPhone 0.99 Beginner's Guide by Pablo Ruiz

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

Time for action - showing feedback

We want our game to tell the player when he is doing well, just a little something to make him feel like he is playing his best game. For that, we will show the score that was granted for matching a set of stones. Showing these encouraging messages are very important in a game, because they make the player feel rewarded for his ability, thus making him want to keep playing.

So what we want to do is, when a set is matched, find the center of that combination and place a label there (which we'll animate later). That label will obviously be a CCBitmapFontAtlas label.

For starters, go ahead and import the two files we will need for making the CCBitmapFontAtlas work. Those files are feedbackFont.fnt and feedbackFont_0.png ...

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