Android Game Programming by Example

Harness the power of the Android SDK by building three immersive and captivating games

Android Game Programming by Example

This ebook is included in a Mapt subscription
John Horton

1 customer reviews
Harness the power of the Android SDK by building three immersive and captivating games
$0.00
$18.00
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781785280122
Paperback388 pages

Book Description

Android gaming is a hot topic these days, but one of the few areas of technology that does not have an abundance of clear and useful documentation online. However, there is an ever-increasing demand for Android games.

This book will help you get up to speed with the essentials of game development with Android. The book begins by teaching you the setup of a game development environment on a fundamental level. Moving on, the book deals with concepts such as building a home screen UI, implementing game objects, and painting the scene at a fixed resolution. Gradually, it builds up to the implementation of a flexible and advanced game engine that uses OpenGL ES 2 for fast, smooth frame rates. This is achieved by starting with a simple game and gradually increasing the complexity of the three complete games built step by step. By the end of the book, you will have successfully built three exciting games over the course of three engrossing and insightful projects.

Table of Contents

Chapter 1: Player 1 UP
A closer look at the games
Setting up your development environment
Summary
Chapter 2: Tappy Defender – First Step
Planning the first game
Building the home screen
Coding the game loop
The PlayerShip object
Drawing the scene
Deploying the game
Summary
Chapter 3: Tappy Defender – Taking Flight
Controlling the spaceship
Building the enemies
The thrill of flight – scrolling the background
Things that go bump – collision detection
Summary
Chapter 4: Tappy Defender – Going Home
Displaying a HUD
Implementing the rules
Ending the game
Adding sound FX
Adding persistence
Iteration
The finished game
Summary
Chapter 5: Platformer – Upgrading the Game Engine
The game
Upgrading the game engine
Summary
Chapter 6: Platformer – Bob, Beeps, and Bumps
The SoundManager class
Introducing Bob
Multiphase collision detection
Player input
Animating Bob
Summary
Chapter 7: Platformer – Guns, Life, Money, and the Enemy
Ready aim fire
Summary
Chapter 8: Platformer – Putting It All Together
Bullet collision detection
Adding some fire tiles
Eye candy
Summary
Chapter 9: Asteroids at 60 FPS with OpenGL ES 2
Asteroids simulator
Introducing OpenGL ES 2
Preparing OpenGL ES 2
Building an OpenGL-friendly, GameObject super class
The spaceship
Drawing at 60 + FPS
Summary
Chapter 10: Move and Draw with OpenGL ES 2
Drawing a static game border
Twinkling stars
Bringing the spaceship to life
Rapid fire bullets
Reusing existing classes
Drawing and moving the asteroids
Scores and the HUD
Summary
Chapter 11: Things That Go Bump – Part II
Planning for collision detection
Performing the checks
Precise collision detection with the border
Precise collision detection with an asteroid
Finishing touches
Summary

What You Will Learn

  • Build simple to advanced game engines for different types of game, with cool features such as sprite sheet character animation and scrolling parallax backgrounds
  • Design and implement genuinely challenging and playable levels
  • Implement the critical main game loop
  • Implement basic and advanced collision detection mechanics
  • Bring to life a challenging enemy AI
  • Make the math behind 2D rotation, velocity, and collisions simple
  • Run your game designs at 60 frames per second or better
  • Process multitouch screen input effectively and efficiently
  • Implement a multitude of other game features such as pickups, firing weapons, HUDs, generating and playing sound FX, scenery, level transition, high scores, and more
  • Implement a flexible and advanced game engine that uses OpenGL ES 2 for fast, smooth frame rates

Authors

Table of Contents

Chapter 1: Player 1 UP
A closer look at the games
Setting up your development environment
Summary
Chapter 2: Tappy Defender – First Step
Planning the first game
Building the home screen
Coding the game loop
The PlayerShip object
Drawing the scene
Deploying the game
Summary
Chapter 3: Tappy Defender – Taking Flight
Controlling the spaceship
Building the enemies
The thrill of flight – scrolling the background
Things that go bump – collision detection
Summary
Chapter 4: Tappy Defender – Going Home
Displaying a HUD
Implementing the rules
Ending the game
Adding sound FX
Adding persistence
Iteration
The finished game
Summary
Chapter 5: Platformer – Upgrading the Game Engine
The game
Upgrading the game engine
Summary
Chapter 6: Platformer – Bob, Beeps, and Bumps
The SoundManager class
Introducing Bob
Multiphase collision detection
Player input
Animating Bob
Summary
Chapter 7: Platformer – Guns, Life, Money, and the Enemy
Ready aim fire
Summary
Chapter 8: Platformer – Putting It All Together
Bullet collision detection
Adding some fire tiles
Eye candy
Summary
Chapter 9: Asteroids at 60 FPS with OpenGL ES 2
Asteroids simulator
Introducing OpenGL ES 2
Preparing OpenGL ES 2
Building an OpenGL-friendly, GameObject super class
The spaceship
Drawing at 60 + FPS
Summary
Chapter 10: Move and Draw with OpenGL ES 2
Drawing a static game border
Twinkling stars
Bringing the spaceship to life
Rapid fire bullets
Reusing existing classes
Drawing and moving the asteroids
Scores and the HUD
Summary
Chapter 11: Things That Go Bump – Part II
Planning for collision detection
Performing the checks
Precise collision detection with the border
Precise collision detection with an asteroid
Finishing touches
Summary

Book Details

ISBN 139781785280122
Paperback388 pages
Read More
From 1 reviews

Read More Reviews