Alien Invaders

  • Dev C++/Allegro
  • 01 May 2012
Install Game        Download Source Code 

Role: Game Programmer

Responsibilities:

  • – Develop game using Allegro graphics library in C++.
  • – Built game logic and graphic update loops.
  • – Built enemy AI, animations, blood pooling effects, and collision systems.
  • – Built system to play animations based upon sprite sheets.
  • – Built weapon system which supported a variety of weapons:
    • – Flamethrower
    • – Homing missile
    • – Thrown projectile
  • – Built enemy spawn system that changed dynamically based upon level.
  • – Created artwork using Photoshop and imported it into the project.

Length: 3 weeks


 

Robot-Apocalypse-2011-12-11-11-37-45-33-300x225Alien Invaders was a game I developed for a Digital Arts class I took. The conditions of the project were that I create all the art in Photoshop, but apart from that I was given free reign. The concept of the game is that aliens are invading Earth and you are its defender. You are inside a hover tank with two weapons; a flamethrower and a homing missile. As you can imagine, the flamethrower is effective for short ranged attacks while the missiles are effective for long ranged attacks. In fact, since a homing missile never misses it’s target, you must be at a long range to fire a homing missile. You can use the flamethrower at all times, however it has limited fuel and a short range. This information is conveyed by a line that stretches from the tank to where your mouse is; a green line indicates that missiles may be used while a red line indicates otherwise. Aliens will spawn out of warp holes on the ground and they have two main attacks: when they get close enough to the hover tank they will maul it and when they are at range they will fire blue missiles at it. There are three aliens per warp hole and once they have been vanquished the warp hole will close. The amount of warp holes that spawn each level increases as the game goes on. Closing all the warp holes advances the player to the next level which takes them closer to their goal of saving Earth.

Working on this project was a lot of fun because I was given a lot of creative freedom. It was also very difficult for the same reason. I knew I wanted to create a game but brainstorming an idea that I could realistically create in two weeks was a challenge. Once I settled on the space theme for the art, I was able to start developing. I took an Object Oriented design approach to the project structure so that I could continually add more features up until the deadline without breaking code at the last minute.

Robot-Apocalypse-2011-12-11-11-37-30-33-300x225An example would be the flamethrower. It was an object I created early on but then didn’t expand upon until the last couple days. One of the things I added to the flamethrower functionality was a scorching effect. Whenever the flamethrower is used it darkens the ground where the flames hit. This was done by using two images of the background: a regular ground image and a burned ground image. The regular ground image was drawn first on every game loop update and the scorched ground image was drawn second. However the only pixels of the scorched background that were drawn were the areas where the flames touched the ground. Another last minute feature I was able to add was a blood pooling effect when an alien died. This was done by randomly drawing red pixels to the screen in an octagonal area around the deceased alien.