Objective: Move an object in a zigzag pattern using a mathematical sine Wave.
If you observe the structure of a sine wave it follows the same pattern present in a zigzag movement. This becomes more evident if we flip the Sine Wave on its side as the image below demonstrates.
Regular Sine Wave:
In the previous article, I went over how to detect colliders surrounding the Player, and how to use that logic to destroy enemies within a given area. As a follow-up, this article will cover the visual aspect of the AoE and how it can be set to be a temporary secondary weapon in my 2D Space Shooter.
Objective: Create a shockwave animation that becomes activated through code along with the Area of Effect Attack method we created in the previous article. …
As a gamer, I have always been a fan of Area of Effect(AoE) Attacks — they are amazing for crowd control and they can easily be one of the most useful tools in your arsenal. In the coming articles, I will be breaking down how I added an Area of Effect Attack for my 2D Space Shooter.
Objective: Detect the collider from specific objects surrounding the player within a given area.
Physics2D.OverlapCircleAll returns all colliders within a circular area and allows us to perform an action per collider.
For purpose of the AoE, we’ll be focusing on three of its…
We already have Damage VFXs, Explosions, and a Lives Counter UI…why not make things more dramatic by adding a camera shake when the player gets hit? After all, visually representing gameplay elements makes for great game design!
Objective: Temporarily change the camera transforms to random positions to create the illusion of shaking. Then set the position back to the default so that the camera is not indefinitely displaced.
2. Create three…
After creating a Lives Counter UI Element, and adding Damage VFXs Using Sprites, it’s time to give the player a way to heal. For the purpose of my 2D Space Shooter, this will be done in the form of a Power-Up, but this logic can work for any collectible that uses a Collision System.
Objective: Create a Power-Up that, when collected, restores lives to their maximum value, or a value of choice. We will also disable the Damage Visual Effects so that the ship looks brand new.
In the previous article, I talked about how to program an Ammo Count UI that decreases whenever the player fires their weapon and disables firing when they run out of bullets. With limited ammunition comes the complementary Ammo Collectible to balance out gameplay — we can’t have the player indefinitely run around without bullets right?
Objective: Create an Ammo Collectible to replenish the ammunition for the player.
This tutorial uses the code from the Simple Ammo Count System in Unity and focuses on the programming aspect. …
Displaying the ammo count for our player is not only extremely helpful but adds a whole new level of depth for the gameplay. Limited ammunition makes the player more mindful, and being able to actively see how much they have left can help them prepare better strategies.
Objective: In this article, you will learn how to add an ammo count UI that updates whenever the player fires their weapon. Once the ammo runs out, the player won’t be able to shoot and an “empty ammo” audio will play.
Edit Note: The Ammo Collectible article has been released! If you want…
Who doesn’t love force fields? They make you invulnerable, they look cool and Science Fiction has been hyping them up since 1931! Elements or power-ups that beget temporary invincibility have been present in video games for years — and as a principle of good game design, they are visually or audibly represented for the player.
Objective: In this article, you will learn how to make a forcefield that can absorb three hits before becoming inactive. Each hit will damage the force field which will be represented by changing the color of the shield as it loses power.
The Sprite Renderer…
Enabling the option to exit a game or application at any time is a standard feature that should be implemented. The Unity Engine allows us to do just that in a universal way that can work for Windows, Mac, and Linux.
In today’s article, you will learn how to register the Escape button to exit an application or game.
In the previous article, I went over how to use the Unity Build Settings to create a test version of your game or application which can be fully executed directly from your computer. Now, it’s time to learn how to make it sharable online!
Objective: Make a shareable version of your game or application.
To install, go to File → Build Settings → Platform → WebGL → Install with Unity Hub
An ambitious writer, and video game narrative designer on a journey to become a Unity Game Developer, and Sofware Engineer.