Game Development Reference
In-Depth Information
Figure 12-10. The explosion animation texture (explode.png, 256×256 pixels)
Each frame of the animation is 64×64 pixels in size. All we need to do is generate texture regions
for each frame and put them into an Animation instance we can use to fetch the correct frame
for a given animation time, just as we did for the squirrel and Bob animations in Super Jumper.
Sound and Music
For the sound effects, we used as3sfxr again. We found the explosion sound effect on the Web.
It's a public domain sound effect, so we can use it in Android Invaders. For our own version of
Android Invaders, we recorded the music ourselves with real instruments. Yes—that's very
old-school. Here's the list of audio files for Android Invaders:
ï?® click.ogg : A click sound used for the menu items/buttons
ï?® shot.ogg : A shot sound
ï?® explosion.ogg : An explosion sound
ï?® music.mp3 : The rock/metal song we wrote for Android Invaders
Plan of Attack
With our game mechanics, design, and assets in place, we can start coding. As usual, we create
a new project, copy over all of our framework code, ensure that we have a proper manifest
and icons, and so on. By now, you should have a pretty good grasp of how to set things up.
All the code of Android Invaders will be placed in the package com.badlogic.androidgames.
androidinvaders . The assets are stored in the assets/ directory of the Android project. We use
the same general structure we used in Super Jumper: a default activity deriving from GLGame ; a
couple of GLScreen instances implementing the different screens and transitions, as shown in
 
Search WWH ::




Custom Search