Chapter 4
Drawing The Environment
In this chapter you are going to learn how to render a background to your game. The background sets the tone and the environment for the game. For Star Fighter, the environment is going to be a background of stars, planets, space ships, and debris. You are going to use OpenGL to set the background into the game and render it to the screen.
Given that a single background is pretty impressive, two backgrounds must be twice as impressive. Well, not quite – but two backgrounds that run at different speeds give your game a visual depth that can be very interesting. You will be adding a second layer of background to your game that will scroll at a faster speed than the first.
Later in the chapter, you will take a ...
Get Practical Android 4 Games Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.