Chapter    7

Loading Images and Spritesheets

Android games would not be nearly as interesting without images. We all can remember iconic video game images such as Mario, Steve from Minecraft, and Master Chief. In this chapter, you’ll load an image into your game and map it as a texture onto the polygon that you created in the preceding chapter.

The image that you are working with is a star field, illustrated in Figure 7-1.

9781484217177_Fig07-01.jpg
Figure 7-1. The star field image

Adding the Image to Your Project

Before you can use the image, you need to add it to your project. There are two things that you must confirm when adding an image to your project.

First, the ...

Get Android Studio Game Development: Concepts and Design 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.