The world of lighting in Unity has nothing but exciting constructs and I am beyond thrilled to share them starting with this series of cinematography and lighting.
Light has a special trait of reflection which makes it extremely complex to calculate and mimic. Plus, when it has to happen while the game is being played without any lag takes it a notch further.
In Unity, there is a term called global Illumination, which consists of multiple techniques and mathematical models that help simulating lighting behavior that resembles to the real lighting.
The GI provides following 4 broad tools for its…
Starting with this article, I’ll be exploring lighting in Unity.
The section of graphics in Unity documentation begins with render pipelines. So before getting into the lighting which is one part of the process, it would be of a great help to get a brief context of what is a render pipeline and what role it plays in lighting.
The exercise here demonstrates deploying a boss enemy wave using UI elements.
The biggest challenge that I faced while completing this part was halting the method execution in the spawn manager. After searching through a few options that obviously did not work, I decided to use a UI element to become the driver here.
Below is the basic pseudo-code for the task at hand.
The exercise here demonstrates making the enemy detect the player’s laser and move it sideways to save itself from getting destroyed.
The plan is as followed.
To detect the presence, the first requirement is to see which object should check the presence. If the enemy prefab does, by the time the presence is detected, it should be destroyed.
So, there must be another object that…
The exercise here demonstrates making the player magnetic towards free-flowing powerups by pressing the C key.
here is the implementation for the tasks above.
The exercise here demonstrates a way to make the enemy prefab destroy a powerup made for the player.
The plan to make this work is as followed.
The exercise here demonstrates rotating the enemy prefab after it reaches a nearby location to the player and then firing sideways.
Before moving ahead, please make sure you have a new enemy prefab and an associated laser/bullet prefab in place with basic components such as rigid body, box collider, etc.
The pseudo-code is as followed.
The exercise here demonstrates implementing a wavy movement of a projectile being fired from an enemy in a 2D game.
Before moving ahead, please make sure there is a separate enemy prefab and an associated projectile prefab in place.
The exercise here demonstrates a way of introducing a powerup that stops the player from firing for 5 seconds.
The spawn manager takes care of spawning powerup prefabs and the powerup script gives these prefabs speed and collision capabilities. Please make sure that there is a similar configuration at your end to follow along.
First, a prefab has to be created.
Work in Progress.