Game Development Reference
In-Depth Information
Pixel Shooter game design
Pixel Shooter is very basic shoot 'em up. Alien ships enter the screen from the top, and the
player's job is to shoot them with missiles. The player controls a ship with the mouse, and fires
missiles with the mouse button. The speed of the alien ships move increases as the game
progresses. If an alien touches the player's ship, it is destroyed. The player loses when his/her
ships have been depleted.
Pixel Shooter graphics
We will have four MovieClip s in this game, each one stored in the .swf library.
This might be a good time to download the code for the topic from the web address printed on the
back cover. You can find these assets in /source/projects/ch1_shooter/shooter.fla .
The first is exported as a class named ExplodeImage . It has three frames, each created a single
.gif image. The MovieClip is structured so that each animation graphical image takes two
frames. The last frame is blank, with a stop() action. This means the MovieClip will play and then
stop on the seventh frame, which is blank. We will test for this frame in our code to see when the
explosion is finished and can be removed from the screen. See Figure 1-8.
Figure 1-8. Explosion frames (top) and the explosion MovieClip (bottom)
The other three graphics we will need in this game follow and are shown in Figure 1-9:
PlayerImage : The ship the player controls
EnemyImage : The alien ships the player is trying to shoot
MissileImage : The missiles the player fires
Search WWH ::




Custom Search