Choppa

Top  Previous  Next

This month's project gives us the code for a helicopter that is controlled using the WSAD keys for movement, the up and down arrows to set the altitude and the mouse to aim and fire at the enemies. Run the level, and then press and hold the up arrow key until the chopper stops moving.

 

aum81_choppa1

 

We are looking at a huge level, with lots of trees and a dozen of enemy turrets (maybe more).

 

aum81_choppa2

 

Move the mouse around and fire at will; you can destroy the turrets from a big distance if you take into account chopper's movement speed.

 

aum81_choppa3

 

The turrets will have their chance as well; they start firing as soon as you come closer than 10,000 quants to them.

 

aum81_choppa4

 

In fact, these turrets can be quite annoying; the player will die after being hit 10 times (or so).

 

aum81_choppa5

 

As you can see, we've got indicators for shield, vertical speed and horizontal speed. Fly upwards until you reach the desired height, and then press the up / down arrow keys until the vertical speed indicator is close to zero to stabilize it. Then, use the WSAD keys to move around and the mouse to aim and shoot at the enemy turrets.

 

The code is well commented.