For today’s article, I’ll be going over how I used Interfaces when developing my shoot ’em up game in Unity.

Full Code Source:

The Game:

What are Interfaces?

An interface in C# serve as a data contract where all classes to fulfill when implementing. The I in front of Example isn’t required to…


Source: https://www.publicdomainpictures.net/pictures/300000/nahled/money-attracting.jpg

For today’s article, I’ll be going over how to implement attracting multiple power-ups nearby the player ship. To see the full code-base for reference and to follow along more closely, please visit my github repo: https://github.com/hlimbo/Space-Shooter-Tutorial

Adding Attract Behavior in Player Script


Image credits: https://www.publicdomainpictures.net/en/view-image.php?image=223417&picture=dice

RNG or Random Number Generation is a concept that is applied throughout many kinds of games ranging from Pokemon to gacha games such as Genshin Impact.


Wave System!!

For today’s article, I’ll be going over how I implemented a system that spawns a group of enemies divided into waves using Scriptable Objects. To see the full source code, please visit: https://github.com/hlimbo/Space-Shooter-Tutorial

Scriptable Objects


For today’s article, I’ll be going over how I added screen shake whenever the player ship gets hit. To see the code, please visit: https://github.com/hlimbo/Space-Shooter-Tutorial

The Code

We start the camera shake via coroutine and will only last for up to shakeDuration seconds. This coroutine runs at the end of every…


For today’s article, I’ll be going over how I created the double helix shot using 2 sine waves. To see the code of my game, please visit: https://github.com/hlimbo/Space-Shooter-Tutorial

What is a Sine Wave?


For today’s article, I’ll be going over how I limited the number of lasers that player ship can fire. If you’re interested, you can take a look at https://github.com/hlimbo/Space-Shooter-Tutorial to see more of the code in depth.

Modifications to the Player and UiManager scripts need to be made in order…


Boosting!

For today’s article, I’ll be going over how I add speed boost to the player ship.

Unity Editor Setup

In the Unity Editor, I created an empty game object named Thruster as a child object of the Player. …


For today’s short article, I’ll be going over how to allow the player to quit the game by pressing the ESCAPE key.

Note: this is super useful only when the Unity game is a standalone build and especially when on full screen mode.

How to do it

if(Input.GetKeyDown(KeyCode.Escape))
{
Application.Quit();
}

Application.Quit() function will not work when playing the game from the editor. To test out the functionality, you must build a standalone executable of the game.

What it looks like in action

Harvey Limbo

Software Engineer

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