O'Reilly logo

Practical Android 4 Games Development by J. F. DiMarzio

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

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 ...

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