Since most of the Phase 1 one was giving the player benefits over the enemies, the Phase 2 starts with just the opposite. This time I will implement a new enemy movement type, and it is movement from side to side. So not only enemies spawn from the top of the screen, they can now spawn also from the left or right side.
To make matters simpler for me, I made two new enemy prefabs, one for each side. That is, one enemy goes from left to right and the other goes the opposite direction. …
I used GitHub’s Projects to plan and follow my progress on the Phase 1 of my Space Shooter project. Now that I have finished this phase it’s a good time to review how the GitHub’s Projects faired.
The best part of it is, that everything is in the same place. My project repo, the plan, the issues, everything. This way I don’t have to use multiple sources to follow my progress, or look up what to do next, or update what features I have already implemented. It’s all in the same place.
It is also easy to make a new…
Probably one the best ways to show taking a hit or being affected by a blast is the good old camera shake. Turns out it is quite easy to produce in Unity. Don’t believe me? Then read on and find out if you’re right.
I could do this inside the Player script where I have the Damage method as well, but I think it’s best to make a new script and attach that to the Main Camera. At least for me it’s the default camera, and also the only one that my project has.
Inside that script I have to…
I implemented the thrusters earlier, but I didn’t implement any limitations to them. Today I will change that.
First I start of with adding a UI Slider element to my game. This will provide me with a nice looking bar that can be used as a visual representation of active thrusters. After positioning and turning it I change the default bar color and its fill. Then I change the background color so that the player can easily see that the thrusters are being emptied.
To spice things up I decided to make a new sort of fire powerup. This one will be a bit overpowering, possibly even too overpowering, but it does have a secret.
Before I get to that, the new powerup is called destroyer beam, such a creative name… At first I did the usual stuff, nothing new here.
The interesting part is how the powerup works. It replaces the normal laser with a beam type weapon. This beam can be maintained for the whole duration of the powerup, that is five seconds, by holding the spacebar. …
I start to feel bad for the enemies, it’s getting harder and harder to kill the player. Especially after today, when I implement a health collectable, which heals the player by one life.
To begin making this cheat I first create the extra life by using the same sprite as I used for the player’s ship as a model. I make it a bit smaller though, so that it’s a bit harder to detect.
A shooter style game with limited ammo and no way to gain more would most likely not become the next hit game. So let’s make a new powerup to remedy that.
Since I haven’t decided yet on the final visuals of my game, I make the powerup with the laser sprite found in the Filebase. Probably not the fanciest looking ammo powerup, but it will work for now.
Yesterday I gave the player two extra lives by making the shields sturdier. Now is the time to even out the odds by limiting the amount of ammo the player has. Why? Because I can, Muahahahhahaaa…
I don’t want to be too evil, so I will start by making a hint for my player that smashing the spacebar will make their life miserable. To do this, I add a new UI Text element to indicate how much they have ammunition left and what’s the maximum that they can have.
Up to this point my shield powerup could take only one hit. While this is a decent option, it takes away the possibility to have a bit more engaging visuals in my game.
To remedy this I will give the shields the option to block three hits and make them change visually after each hit. Now, the lives are just a new int type variable, so I won’t concentrate on that.
Instead let’s think of the options for the visuals. The option number one would be to have something similar to my player’s lives. …
Thus far the only option to get more speed has been the speed boost powerup, while it is a good method there is still the question of randomness involved. After all it doesn’t drop that often and all the powerups are randomized, that is it might not drop at all.
That’s why the thrusters come in handy when dodging those pesky enemies. To make them different from the speed boost powerup, I increase the players speed by 1.5 only. This way it is still beneficial to pick the powerup, because it gives a greater boost.
Unity game developer in the making.