Summary

With Penguins Can Fly, we implemented yet another Box2D game, but we took a big bite with this one. We started by using the CCRenderTexture class to generate the sprite that we would use to create our picturesque landscape and then spent a decent amount of time rendering the stripes, gradients, and highlights into the texture. We wrote a neat little algorithm to generate the smooth curve of the hill and bound a Box2D body to that curve. We also discussed collisions in Box2D.

You learned so much in this chapter and did so much hard work. Let's keep it going with the next chapter, where you will learn how to use a tile-based editor and create a simple tile-based platform game with a reusable tile-based collision detection algorithm.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.122.68