This was the final project for Interactive Digital Media. The assignment was to create any kind of game using Flash. I chose to make a 2D tank battle game where the player controls a tank that can shoot using the turret and machine guns. The game features both a tutorial section where the player can practice on stationary targets, as well as the main game mode where the player fights against other tanks. This project was one of the few game prototypes that I made at school that was not a team project.
When making this game, I found that Flash doesn’t have a built-in collision detection system that was robust enough for what I needed. I decided experiment with writing my own implementation for 2D hit detection. I looked up some math for hit testing convex polygons and wrote in some logic that is used for when the tanks run into each other or get hit by projectiles.
Because this game is single player, I had to write an AI algorithm that could govern the behavior of the enemy tanks. The enemies follow a simple set of rules, such as moving toward the player and shooting if they are facing the right direction.
The sound for this game was one of my first attempts at sound in Flash. I took some loops from a techno song that has an increasing tempo, so as the player advances in the game, the tempo of the music increases.
Lastly, I wanted the game to have an element of stickiness to it. I added points and levels so that players could compare scores, or try to beat their own high score.
