My latest update to my space shooter game is an enemy that has random movement. This was rather a simple thing to implement and the code below pretty much explains it all.

The ZigzagEnemy method is on my Enemy script and takes a float variable that is a random number between 0–100 that is changed in the coroutine every second. This random number will determine if the enemy moves down, left, or right. One thing I learned is to be careful when calling a random number on update because it might not behave how you would expect.

Here is what they look like!


So a while back, I added Thrusters to the player. While these thrusters work, there is nothing visually to show the player that they are using the thruster besides the fact that they sped up. Two things were added to solve this problem: A thruster bar UI element and activating/deactivating…


With the addition of the drone shot power-up, my game now has 6 power-ups. Some are more powerful than others, so I wanted to make a system that makes some power-ups rarer than others. …


As previously mentioned in my last article, I created a new weapon type called a Drone Shot. This weapon type can not miss! It will find the location of the nearest enemy and track it down until it is destroyed. This weapon also does not consume ammo because it is…


The next thing new feature to my game is supposed to be a new weapon type. As I was thinking about what to do, I realized that my Player script was handling what weapon was being used. …


Adding a camera shake when the player gets hit is another great way to visualize that the ship getting hurt and immerse the player further. I wanted variety in my camera shakes and after some research Cinemachine seemed like the best approach.

Cinemachine can be downloaded from the Package Manager…


I recently added shield strength to my Space Shooter game. The shield powerup can now take three hits before it is destroyed. Each time the shield is hit, it’s alpha is decreased which makes the shield appear weaker.

The way the shield visualizer functionality was originally set up was when…


Player Ammo

The first thing I thought of when it came to ammo was a UI display to let the player know how many shots they have. So I started with creating a text object on my canvas that would then be accessed in my UIManager script. …


I finally finished the Space Shooter 2D course videos which has been guiding me through this game. Before I begin the “Phase 1: Framework”, where I start to implement features on my own, I wanted to show off what the game looks like now!

VFX and Post Processing

My game now has explosions, thrusters…


When you build a Unity application that is played in a fullscreen mode, there has to be a way to quit the application. If this is not implemented, people that use this application will only be able to quit the application through the task manager.

Luckily, this is very simple to implement:

This snippet of code was put into the Update method of my GameManager. With this code, I will be able to leave my game by hitting the escape key when it is built!

End of a short GDJ 16!

Brett Blandford

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store