Summary

In this chapter, we covered the basics of the Box2D rigid body physics engine, and thereafter applied the newly gained knowledge, including all the individual parts (rigid body, body type, shape, fixture, and world) by creating a believable physics simulation of raining carrots. Also, two new game objects were added, which represented the carrot for physics simulations and a huge golden carrot statue symbolizing a level's goal or exit.

Then, we went down the graphics pipeline, more precisely the Programmable Pipeline of OpenGL (ES) 2.0 to explore the use of shaders. We created our own shader program to apply a monochrome filter effect of arbitrary intensity through a uniform variable that can be passed to the shader program at runtime in the application code. You learned about GLSL and created a simple pair of vertex and fragment shaders that are used in Canyon Bunny.

Finally, you learned how to use and work with peripheral devices using the example of an accelerometer. You also learned how to transform the data provided by a sensor into more suitable values. These values were then used as input to create an alternative way to control the player's movement just by tilting the screen to the left or to the right.

In the subsequent chapters, we will add animations to the game.

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

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