An introduction to Penguins Can Fly
In our sixth game, Penguins Can Fly, we lead a cute little penguin through a wide expanse of vibrant, colorful, and breath-taking hills. The controls are quite simple, but the game takes some time to master. The player must simply tap the screen. Tapping the screen pulls the penguin towards the hill. Thus, the game becomes a skill-based judgment game where the player must learn the right moment to release the tap.
Quite a bit of code in this chapter has been ported to Cocos2d-x from a wonderful demo project (https://github.com/haqu/tiny-wings) in Cocos2d-iphone written by Sergey Tikhonov (http://haqu.net/). This demonstrates how some of the challenging features of the game are implemented. A lot of this chapter's explanation on the above demo project is inspired from an excellent tutorial written by Ali Hafizji on http://www.raywenderlich.com/. Please head out to these links if you want to take a look at the original. The original needs some understanding...