Flight Levels
It's time to put on the flight goggles and get to business.
You are a crack pilot and have been called to battle the
forces of evil that are plaguing the planet. Double click on
the program, and when the tower gives you approval, press "P"
to play.
You will quickly see a scrolling scene below your
aircraft. The faster moving clouds are at a higher flight
level than the slower moving ones. This is your cue to the
correct enemy level.
Pushing the joystick once either up or down will change
your altitude (unless you can't go anymore). Left and right
on the joystick will change your position on the screen. You
can't move forward or backward, but progressively through the
game, the forward postion is increased. This allows less and
less reaction time to enemy that might appear.
You will see at once an enemy craft. To shoot it down
out of the sky, you must be at the same flight level. Fire
your guns as soon as possible, a collision will prove deadly.
Fortunately, you have five lives to work with.
The game is won by flying long enough to outlive the
enemy. The game is lost by using up all of your lives. If you
let more than 14 enemy go by without shooting them, then you
will lose a life. A bar at the bottom keeps track of how many
have slipped past.
The program was written is Laser C. Most of the graphics
routines were written with in-line 68000 assembly. The
airplanes were created in four colors so that only two bit
planes had to be put onto the screen. The brown background is
only one bit plane of data. All of the bad guys are on even
word boundaries to avoid any bit shifting. This greatly
increases the speed and reduces the time necessary to put
them to the screen. All of the clouds, although on even
boundaries, are masked to provide a transparent look.
The screen is completely re-drawn every time that the
objects move. This is faster than restoring a number of
smaller areas and then redrawing them. No double buffering
was used, but a delay loop sychronized the redraw with the
vertical blank to avoid flicker.
Hope you enjoy this program as much as I enjoyed writing
it. It may be fodder for a commercial program, so you
aspiring programmers take note.