Alien
Invasion
This project is from the course "Understanding Game Engines" (53-353). Throughout the course, we learned how to work with Unity in order to make all types of games.
​
Alien Invasion is a space invaders remake where the player is a little white cube who's mission is to shoot and destroy the approaching aliens. The aliens also shoot at the player, and the player gets 3 lives before they lose the game. The player can hide behind the white shields in order to protect themselves from alien "lasers", though the shields are destroyed after getting hit once.
Game Features
Stage Design
The background of the game is created using a variety of different sized cubes. They have been angled and stretched out to resemble the mountainous terrain of a foreign planet.

Alien Design
There are three different types of aliens in this game, and they come together to form one unit called the Mothership. Every time the Mothership moves, the shape of each alien changes to try and make the aliens seem more lively. To make this happen, I had to create 3 different types of aliens using white cubes, and then for each type of alien, I created 2 frames that they would switch back and forth between as they moved across the screen.






Explosions!
In order to make the alien explode into little pieces when hit, I made each cube its own RigidBody, and used the AddExplosionForce( ) method. I put each cube into an array of RigidBodies using the GetComponentsInChildren<>( ) method on each alien. After that there is a “foreach” loop that cycles through each cube in the array, and so we are able to set each object to the variable “rb”, and then apply our explosive force to that Rigidbody. This ensure that every object is affected by the force. The fiery explosion animation is from an explosion prefab built with Unity's particle system that was provided to us.
Try it Yourself!
You can download the game for yourself with this link:
https://drive.google.com/file/d/1kp5tUzaqIDtBXDLSobzWsvVQZvQW0lzd/view?usp=sharing
​