Making A 2D Shooter — Introduction
Taking the GameDevHQ 2D lessons to the next level
As a student in the GameDevHQ online program, over the course of many tutorials we all develop a simple but functional 2D shmup. Afterwards, we are provided with a series of challenges we are expected to tackle in order to independently expand upon the base game and demonstrate our proficiency with Unity.
These challenges include developing new powerups and enemies, implementing new player inputs, changing how the game flows, and more. Over the next few articles, I’m going to show how I evolved the original base game into something more complex and challenging.
The Starting Point
It’s important to understand how the game was initially so that we can see how far it will advance by the end. As stated earlier, the game was simple but functional.
The player can move in four directions and fire a “laser” straight forward upon player input. Collisions with enemies or enemy fire would cause damage to the player, and if enough damage is taken the game ends with the player’s destruction.
There is only one enemy type, which comes down from the top of the screen and periodically fires its own “laser”. More enemies are spawned continuously at a (somewhat) random interval. When an enemy is destroyed by the player’s weapons, the player receives a certain amount of points which are added to their score. If the enemy and player collide, the enemy is destroyed but the player gets no points.
There are three kinds of player powerups, which like the enemies spawn continuously. The powerups are speed, triple shot, and shield. The speed powerup makes the player faster for a limited time. The triple shot powerup makes the player’s weapons fire three shots at a time for a limited time. The shield powerup provides the player ship with a shield that both visually changes the player’s avatar and also provides the player with the ability to offset some damage from enemies.
The game has a UI which allows the player to see some useful information, such as their score and the amount of damage they have taken.
And that kind of covers it. The game consists of just destroying enemies until the player is destroyed. Or more likely just gets bored. Or, possibly, until the score counter overflows and crashes the program (it just occurred to me that I never tested for this possibility).
What Comes Next
Over the next few articles, I’m going to go over the changes that have been made to the player, the enemies, the powerups, and the UI. Until then, thanks for reading.