Chapter     7

Scrolling a Background

The solutions in this chapter will help you create a scrolling background for a game. Many game types have background images that scroll as the player is playing. Chances are you have some questions about just how to make the background image of your game appear to move.

In some cases, the images will scroll automatically. For example, scrolling shooters and other “rail”-style games will have backgrounds that scroll automatically. This is in contrast to other game types, such as side-scrolling platform games, where the background image will scroll in coordination with the movements of the player (this is covered in Chapter 8,“Scrolling Multiple Backgrounds”).

This chapter will present three solutions for ...

Get Android Game Recipes: A Problem-Solution Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.