Book Image

Android Game Programming by Example

By : John Horton
Book Image

Android Game Programming by Example

By: John Horton

Overview of this book

Table of Contents (18 chapters)
Android Game Programming by Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
7
Platformer – Guns, Life, Money, and the Enemy
Index

Chapter 6. Platformer – Bob, Beeps, and Bumps

Now that our basic game engine is set up, we can start making some fast progress. In this chapter, we will quickly add a SoundManager class that we will use to make a noise wherever and whenever we please. After that, we will put some meat on the bones of Bob and implement the core functionality we require in the Player class. Then, we can handle the second phase (after clipping) of our multiphase collision detection and give Bob the useful skill of being able to stand on a platform.

After we have achieved this significant feat, we will hand over control of Bob to the player by implementing the InputController class. Bob will at last be able to run around and jump. At the end of this chapter, we will animate Bob's sprite sheet so he actually appears to run, rather than slide everywhere.