Having one powerup for a player is great - but giving him more options and more variety… is even better! Therefore I will have to make my powerup system a bit more modular so that I can reuse it for multiple different ones!
For a modular powerup system, we need to create an ‘Id’ system to identify each powerup easily. We need an ID system so that each power-up can be identified. …
Powerup effects are part of almost every game - but determining how long they should last can sometimes be pretty tricky. It all depends on their effects and the nature of the game's mechanics. Some of them are god-like powers that only last a singular use; some make the player much more robust and should last a limited time; some can act as only a tiny enhancement and can be turned on permanently…
Let’s consider our Powerup - the triple shot, upon the collection of which the player gets the ability to shoot three lasers instead of one. …
Animations are the essence of life in your games; they can make your games feel and look alive.
In order to breathe life into your games, you will need a list or a sequence of sprites that you wish to animate. Next, you need to open your ‘Animation’ window. I like to place the ‘Animation’ right where I have my ‘Game’ window. This allows me to work on my animations and view them simultaneously in my ‘Scene.’
Here we are, the point where this little project starts to look like something… A player reacting to the user input, with the ability to shoot down the ever spawning enemies with a laser weapon or colliding with them, with some basic artwork and effects. There is still a long way to go, but yes… it is starting to look like a real game!
And the next thing to add is a power-up - a triple-shot! Because one laser is never enough!
There are four steps to adding this power-up!
Now that we have prettied up our game, it is time to give our game a loose condition.
For this purpose, I will be diving a bit into the ‘Singleton pattern’ and creating a new ‘GameManager.’ For the time being, our ‘GameManager’ will be responsible only for knowing when the game is over - for now, that will be when our player dies.
What is Singleton, what are the advantages and disadvantages, and when to use it?
Singleton pattern is used when you wish to create a class with only a single globally accessible instance available at all times. …
Every great game is a long and arduous journey and takes a long time to make. Each step on the way is important, but knowing when to take each action is the most important. Today I am here to talk about ‘Prototyping.’
Prototyping is a sample of the product that we wish to create. It is there to test out our idea and how it might feel actually playing that idea without having to focus on the graphics, animations, sounds, and all the flashy things. …
Setting up your game’s basic mechanics is undoubtedly the essential step in the creation of your game. But once that is done, you want to give your game some feeling of uniqueness and its own identity. Unity3D is very good for prototyping, but once you are beyond that phase, it is now time to start creating your game with graphics, sounds, and visuals! Getting all of this done is one more step closer to finishing your game.
We will be doing a transition from 3D into 2D today. Luckily we already have a premade asset set from friends from GameDevHQ…
Whenever you ‘Instantiate’ a GameObject into the game, it appears as an object in the ‘Hierarchy’ window. This is awesome but can become chaotic pretty fast when you start instantiating all of those prefabs!
It is always beneficial to maintain a clear and exact Hierarchy system for your GameObjects. This is because when you go about creating a game, there are constant changes to your GameObjects and to your scene - and the faster and easier you can find that one you are looking for, the better!
Let’s take a look at our Hierarchy from our previous article, where we…
What are Coroutines?
Code that’s called inside of Update takes place all at once during the current frame. On the other hand, Coroutines allow you to execute game logic over a number of frames.
They allow you to pause a function and tell it to wait for a set amount of time or wait for an action to occur before continuing.
Now that we have our Player ready and our enemy spawning… now we need... an actual challenge - you just beat the ‘game’ in one touch or by shooting your laser once at the enemy. …
Unity is a system that consists of ‘Components’ that define the properties and behaviors of every GameObject. We can access and work with our components' values in our scripts.
We will be doing this via the ‘GetComponent()’ method. This method allows our scripts to communicate with each other, and that is what we will be talking about today.
Aspiring and eager beginner Unity developer