Chapter 8
Scrolling Multiple Backgrounds
In Chapter 7, solutions were presented for creating a background that could scroll. While that solution will help you create a compelling looking game, it could have more depth.
In this chapter, you will be presented with solutions for loading and using two images in your game’s background. Not only will this make your game more dynamic, it will allow you to scroll the two images at different speeds.
At the end of this chapter, a solution is presented for scrolling two different background images at different speeds. This gives a game a more realistic look and it adds depth to an otherwise flat environment.
8.1 Load Two Background Images
Problem
The background of the game needs to contain two images. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access