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…

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…

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 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