My next challenge was to create a completely new enemy type, with both a unique projectile and movement behavior. So of course, I gave myself the hardest challenge I could and created the enemy you see above. It took various different elements to piece it together, and this article will do it’s best to show an overview on each.

First, I had to choose an enemy. Much like my missile, the enemy I found was a 3D object. So I imported it to Blender and added the materials so it looked just like the Prefab I downloaded in Unity from…

My next challenge was to create a powerup that negatively affects the player. What felt the most suitable to me was to have a powerup that stalls the engine for a set time, creating tension while you are unable to evade enemies.

First, I used my trusty GIMP template to create a new animated sprite. I opted for a dark shade of red as it appears similar to the Health powerup and could easily be mistaken in the middle of the battle.

The next challenge was to implement a wave system. While this won’t be quite as thorough as it will be with more enemy types, I could at least put the system in place.

To start, I created an Empty Game Object within the Canvas, that then housed a Wave ID text object, and a Wave Timer text object.

Enemy Movement

Yesterday V1.1 released, you can find it here.

Therefore, today marks a new set of challenges, making the game much more fleshed out and difficult.

The first challenge was to create alternative enemy movement. For this challenge, I simply wanted the already existing enemy to attack from different angles. While I could create a whole new enemy, the functionality is going to be the same, much more advanced enemies of different models will come later!

Let’s get started.

Dragging the Enemy Prefab into the Scene view and experimenting, led me to find I like the rotation angle of 75 degrees…

Adding some stronger feedback when the Player takes damage, not only feels more immersive, but acts as a great distraction to create both panic and focus. Let’s add it to the Space Shooter!

Rather than manipulating the Camera within the Player Script, I added a CameraShake Script to the Camera object. On experimenting with moving the transform position of the camera, I also decided I didn’t want the background overlay to appear to change positions, so I made it a child object of the camera, now when I shake the camera, the background will follow the camera’s position.

In the…

Previously, I created a thruster that can boost the player’s speed when the shift key is held down. Currently, this can be held indefinitely, I wanted to create a system where the user has to think about when to use it sparingly.

To do so, I would create a UI Slider to visualize the value of the thruster level. Then in code, I need to create a way to drain this value, but also a recharging function based on a timer.

To start, I created a UI Slider and deleted the Handle object, as I don’t want it to be…

Let’s continue on from yesterday, and start defining some of the Rotation conditions, before then implementing the visual functionality.

First, I need to remove the parent objects of the Missile. Otherwise, when the Player moves, the missile still follows relatively whilst moving forwards. To do so, in the Fire method, I simply set the transform.parent to null.

The Super Shot laser was pretty easy to implement, so I wanted an additional challenge of creating “heat seeking” missiles.

I found some missile packs within Filebase, and liked the visual look of the one pictured above. There was one problem though, it was a 3D object, therefore it wasn’t going to function well with the rest of the objects in my game.

To solve this, I downloaded Blender, and imported the FBX. model in. …

To run a test, we can create a temporary int variable for each rarity. Then in the GetRarity return type method, when running through the if statements, as well as returning the corresponding Lists, we can add one to each variable.

To view this at runtime, we can also add a Debug.Log to show the value.

I’m now starting to create some reasonably strong powerups. I don’t want the user to have it too easy, so I created a rarity system so certain powerups spawn more frequently.

First, I had to assign a rarity to each powerup. To do so I created an int variable in the Powerup Script and created a Header for the inspector to show the value levels.

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