If one power-up is good, then it stands to reason that more power-ups are even better. In my previous article, I described a way to keep your power-ups from lasting forever. This time around, I would like to dive into creating different kinds of power-ups modularly.

I have a power-up called Triple Shot. It allows the player to shoot three bullets at once. Now, I want to give my player the ability to collect a Speed Boost.

I could create a whole new Script for this new power-up, or I can devise a method from making my current power-up act…

What would a Top-Down Shooter be without Power-Ups?! Giving the player high-risk, high-reward bonuses during gameplay can break up the monotony of simple point-and-shoot. How long should those power-ups last? The final decision is up to you, but I can show you how you can apply a time limit to them.

The purpose of a power-up is to alter an aspect of a game mechanic and improve on it. It can affect the strength value of the desired feature or change its behavior to give the player an advantage.

In my case, I have created a power-up that allows the…

It goes without saying that animations can breathe life into your games. In Unity, the process of animating sprites is reasonably simple and straightforward. This process does not require any coding for the time being.

Previously, we used the Sprite Editor to slice our sprite sheets into individual images. In your Assets, the sprite sheet should now contain all of its slices.

It hasn’t been that long since I started working on my top-down shooter. I already have my player reacting to user input and some enemies spawning intermittently. I can shoot them down and be destroyed by colliding with them. This project is starting to feel like a real game!

Without question, making sure that your game’s mechanics work without a hitch takes precedence over any other aspect of game development. Unity3D is particularly good for quick prototyping. However, ultimately the goal is to produce a fun experience with immersive sound and stunning visuals. Part of keeping oneself motivated is being able to visualize the end product — at least in part.

I have established some basic mechanics in my game, and I am ready to start swapping out my primitive assets with more appealing visuals.

A big part of game development is the constant management and adjustment of the scene and all of its contents. This process, more often than not, must be handled during gameplay when we get a clear view of how our project and code performs. In Unity, this means searching for objects in the Hierarchy and adjusting values to either test out new ideas or correct errors. You will find that your biggest enemy in this endeavor is clutter.

A top-down shooter like the one I am working on will very quickly see the Hierarchy become unmanageable with laser and enemy…

Coroutines are a special type of method that allows for the execution of code to happen intermittently. In contrast, a regular method in our scripts will run the code block inside of it in the span of one frame. This means that we have to create intricate systems if we want code to run over a length of time.

Unity defines Coroutines as:

A coroutine is like a function that has the ability to pause execution and return control to Unity but then to continue where it left off on the following frame.

Right now, we have our player and…

Unity is a modular system that relies on Components to define the attributes and behaviors of GameObjects. Most of these Components have values that are accessible to us to manipulate either while we are designing our game or during runtime.

Script Communication is a term that defines the ability to allow separate Scripts to interact. When we wish to define behavior based on conditions that our player or game might run into, we can take advantage of this process to react in whichever way we wish.

To do this, we can make use of Unity’s GetComponent() method.

Previously we discussed the basics of Unity’s physics engine. Now we will take a quick look at collisions.

Collisions are the events that happen in Unity when two or more objects in the scene that are equipped with Colliders and Rigid Bodies come into contact or overlap in space.

Unity provides us with two main types of collision methods that assist us in scripting behaviors and interactions:

Unity is undoubtedly a very robust game engine. As such it implements its own system for simulating physics in a very performant way. Unity defines it as a:

complete deterministic rigid body dynamics and spatial query system written entirely in C# using DOTS.

In essence, Unity makes use of Rigid Bodies and Colliders to determine interactions between GameObjects. It should be noted that Unity has two separate systems that cannot interact with each other — A 3D Physics system and a 2D Physics system.

At a Glance:

  • Rigid Body Component: This component is responsible for applying physics simulations to GameObjects such as Gravity…

Claudio Grassi

Experienced digital artist, Unity game developer & coder with a knack for problem solving and a passion for video games.

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