O'Reilly logo

Learning Android Game Programming: A Hands-On Guide to Building Your First Android Game by Richard A. Rogers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3. The Game Loop and Menus

The game loop is often called the heartbeat of a computer game, and indeed it is what gives life to our games. As a game is being played, inputs to the game, status, and outputs all need to proceed in a regular cycle. The game loop is the implementation of that cycle, so an efficient, high-performance game loop is essential for a playable computer game.

Game Loops in General

Computer games are all based on a cycle of operations. The typical steps in such a cycle include the following actions:

• Acquire input from the player.

• Update the game status as a result of user input.

• Update the game status as a result of time.

• Check for collisions among objects.

• Update objects based on game physics.

• Update the user ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required