Android for Game Developers

Android's application framework is vast and confusing at times. For every possible task you could think of, there's an API you can use. Of course, you have to learn the APIs first. Luckily for us game developers, we only need an extremely limited set of these APIs. All we want is a window with a single UI component to draw to and receive input from, as well as the ability to play back audio. This covers all our needs to implement the game framework we designed in the last chapter in a rather platform-agnostic way.

In this chapter you'll learn the bare minimum of Android's APIs to make Mr. Nom a reality. You'll be surprised how little you actually need to know about those APIs to achieve that goal. Let's recall what ingredients we need:

Window management


File I/O



For each of these modules, there's an equivalent in the application framework APIs. We'll pick and choose the APIs needed to handle those modules, discuss their internals, and finally implement the respective interfaces of the game framework we designed in the last chapter.

Before we can dive into window management on Android, however, we have to revisit something we only shortly discussed in Chapter 2: defining our application via the manifest file.

0 0

Post a comment