In Unity, lighting is ‘baked’ to store information in terms of how light sources hit static objects in your scene. This allows the casting of shadows. But quite often in games, we have dynamic objects that we want to react to our light sources.

One of the least intensive but productive ways of doing this is using Unity’s built in Light Probes.

Light Probes allow us to store a series of positions in which lighting data can be stored, to then create shadows as an object passes through the area.

A Light Probe Group needs to be edited to cover…

In Unity, our materials don’t necessarily need to be a solid color or texture. We can also introduce effects like transparency to create glass. The picture below shows a window with no materials, and a finished product.

The world’s not flat, and our game world’s shouldn’t be either! While the scope of most projects are generally contained to a small enough area to be on a flat plane, in the 3D world, we still want the sky to appear spherical.

A Skybox allows us to create a spherical image to contain our game world in, thus appearing in a realistic sense, and allowing the view to change as we move around. Larger games tend to have dynamic changes to these Skybox’s in the sense of weather or time cycles.

Our current game is set inside a building…

My next project looks at Stealth mechanics and Cinematography in a small demo called The Great Fleece. Before diving in, we need to set up an Environment in which to set the level.

I don’t claim to be an expert on the most stunning lighting and visuals, but within my work, I have been known to dabble in operating basic concert lighting rigs. Therefore, I have an idea of what I generally want to achieve and how to get there. Luckily, Unity has some great tools for quickly and easily creating beautiful materials and lighting.

Over the next week, I…

To enhance the first encounter, I added in the starting shield to visualize not being able to initially damage the Boss. Then a smaller shield around the “core” of the ship and the Gatling Gun, to allow for separation between the regular states and the final state.

I now have functional weapons, but I wanted my Turrets to somewhat track the Player. To prevent full rotation and having 9 Turrets all firing directly at the Player, I had the challenge of limiting the rotation.

I also wanted each set of Turrets to appear as a pod of three, so for my Target Direction I calculated this from the Boss’s transform as opposed to each individual turret.

Then I could set clamps on the direction Vector, I calculated this by envisioning a square with each point in opposite corners, then with basic knowledge of internal angles, I set…

I now have a boss that moves in multiple different ways, but what value is it without the ability to hurt the Player.

Let’s start with the Mines that launch out the sides. I want them to disperse in somewhat of a circular motion then continue down the screen, creating obstacles for the Player.

In the different Movement Coroutines, I called a FireMines method, passing through a string for the side. This allowed me to use a switch statement and set the Parent GameObject to be the correct empty object for the side that I set up in yesterday’s article.

The final challenge for my Space Shooter Game, was to make a Boss Enemy.

First, I needed to find a suitable candidate. Filebase had a wicked looking Dreadnought that I exported to Blender to play around with. I ended up separating the small side turrets, and the three large front turrets so I could manipulate them separately of the Boss in my game. I also copied out the yellow mine-looking things on the side, and captured png images of everything to import in Unity as Sprites.

In Unity, I made use of many Empty GameObjects to store the different components…

Today’s challenge was to create a new enemy type that could avoid the Player’s projectiles.

Whilst exploring options for other enemies, I found one that I considered replacing the original enemies with. Instead, I decided I would have this model as an additional enemy type, but with the similar design of three different iterations in terms of how they travel. Straight down, Diagonally Left, and Diagonally Right.

To keep my code easy to read, I wanted to pair these two enemy types together, which meant a bit of reshuffling of ID’s for the advanced enemies I had previously created.

Today’s challenge was to create functionality so that when the ‘C’ Key is pressed, powerups move towards the player. To do so, I would disguise this feature as a Magnet ability that would work on a cooldown state similar to the Thrusters.

In my Player Script, I ran a MagnetCheck method from the Update method. Here, I could check for Input, then run some Coroutines. Additionally, I only wanted to run this if I had a magnet charge greater than 0. My MagnetOff Coroutine starts the cooldown and recharge, so if I press ‘C’ again, I want to stop this…

Calum Slee

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