Objective: Learn how to build games
Since the game is almost playable, it is time to learn how to build it.
We have to access the build settings (File -> Build Settings…).
Objective: Build your game for WebGL
WebGL is a graphic library that allows the rendering of 3D content in an HTML page. It is possible to build a Unity project and make it playable on browsers, through a WebGL build.
In the Build Settings window select WebGL as platform (you should have chosen this option wile installing Unity Editor). Some options are available, for example you can select Development Build for some debugging.
The build button is not yet available: you first have to switch platform!
You can also see a warning concerning the colour space: you have to switch…
Objective: Learn how to play sounds in Unity
Audio is so important in a game that we often take it for granted. While building this game I bet you noticed that something was missing. No sound!
No music, no laser or explosion sound effects are a huge turn off.
In this tutorial we are going to learn how to include sound in a game, how to play it via editor and, most importantly, via script.
Before starting, we have to know how Unity works in terms of sound. There are Audio Sources which are game objects component, carrying an Audio…
Objective: Learn to use the package manager and the Post Processing package
With this tutorial I want to introduce the Post Processing. I am not an artist, but knowing a little more than programming is always helpful.
Post Processing means applying filters and image processing to the game visuals, not affecting the game properties but just how does it appear.
So, let’s put some make up on! The purpose? Step the level up and get close to the visual of great games!
First we have to install a post processing package. Unity Post Processing package is a very good choice.
Objective: Introduce an engine on fire object and set the logic for a hurting VFX
I want to introduce a new effect: when the player gets hit, fire appears on the ship. Let’s design it.
Objective: Improve immersion by adding a thruster VFX
We are going to add some VFX from now on. In this tutorial I’m adding a thruster, which will be an animated sprite child to the player.
As usual I will add some feature so we can learn something new.
First I create a new child sprite and animate it as usual. But I think the something more can be done: if you remember, we have a power up which increases player speed, so what if the thruster also gets bigger, and then turn normal again? Cool, no?
Objective: Manage asteroid spawning along with enemies and power ups. Set the behaviour of asteroids.
I found this part even more funny and interesting. We’re going to spawn also asteroids and take into account a lot of things around, from which we can learn a lot:
First, I introduced a new bool…
Objective: Introduce a new asteroid prefab and logic to control the enemy spawning
This is mostly for fun. What if the enemy wave started after a particular event?
Let’s say we have an asteroid in the middle of the screen, everything is quiet… but then we destroy it and thus we wake those scumbag enemies!!
There is going to be a lot of work, but it will be worth it.
First let’s create an Asteroid prefab using a sprite, attach a C# Script, add a collider (circle, no trigger) and a rigid body component and the explosion animation as did…
Objective: Implement an explosion animation triggered by enemy death
Our little game is getting alive. The next step is to improve immersion by triggering an explosion animation when the enemy dies. By doing so, we’re going to learn about animation states, parameters (such as triggers), layers and how to manipulate everything via C# Scripts.
First things first, let’s create an explosion animation on the enemy, as we already did with the power ups. Of course we will disable the loop.
Objective: Apply knowledge of UI and Scene management to the Main Menu scene creation
Here we’re going to use what we learned before in order to create a Main Menu scene, similar to what we can find in every game we played!
First, let’s create a new scene: from the project view right click on Scene folder and proceed to create a new scene, then load it with a double click.
The scene name will be Main_Menu or something similar. The new scene will be empty of course. …
A professional developer with passion for game developing and skill-growing. A former Nuclear Physics Researcher who changed his life to pursue his dreams