Chapter     2

Loading an Image

It should go without saying that if you plan on developing a game, casual or otherwise, you need to work with images. Everything from the backgrounds and characters to the menus and text is made up of images. Android can use different methods to serve up these images to the screen. This chapter will help to solve any problems that you have had retrieving, storing, and serving images within Android.

There are two distinct ways to serve up an image in Android, and each has its place in game development. The first way to serve up an image in Android is to use core Android methods—or those methods that do not involve the direct use of OpenGL ES. These core methods require little to no code to use, but they are slow ...

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.