Having a balanced game is what everyone wants, nothing too overpowered so you feel like it’s too easy, but on the opposite side, we don’t want things too hard which makes it feel like it’s being unfair. We can change that feeling in the game by adding in a better balance spawning system.
Before the change, we were getting everything pretty well balanced but in a bad way, everything was coming out even, even the missiles, extra lives, and secondary fire, which made things a bit easier at times and other times super hard.
I was showing off the game to a friend and they suggested something that I thought was a good idea, so I added it!
While repairing you can’t move or shoot and if you get hit, it won’t give you an extra life. Makes it a good risk vs reward kind of system. This ended up being really easy to add, only 1 thing that ended up stumping me but after a bit of research and it’s fully working.
Time to add another firing method, this time with missiles!
As with most things, there are many ways to do the same task. This is just one way and as you can see it works well.
Find or make an Image for the missile, After we have that we can add it to the project. You will need to change the texture type to Sprite (2D and UI).
Right now we have enemies just constantly spawning, what would be better is to have waves of enemies that slowly get harder to deal with as the waves go on. Strap yourself in, this one is going to be a long one.
We can use an Enum to store what state the enemy is in, be it spawning the enemies, waiting for the player to kill the enemies, or the cooldown before it starts to spawn more. We will wave to store its state in another variable of the enum as that type.
Having more options is always a good thing. Currently, we have 2 different ways to fire, a single shot and a triple shot. This is all good and well but getting a new way to kill all the enemies would be nice.
Now the fun begins, starting out I had many ideas for this and some of them I may still act on.
Add in a panel to hold all the options, a Button to be able to go back to the pause menu, and a Toggle which we will be using to turn screen shake on and off.
In the UI Manager Script, add a variable to store the camera, the toggle we made, and the options menu. Adding the options menu will let us jump between the pause menu and the options menu.
With GameDevHQ, we have been set a task to make this 2D space shooter. At this point in the journey, we have to research how to do a list of tasks to add to this game.
This one I think I made things a bit harder on myself, not on purpose though. Since I already had a Damage method for the character using a switch statement, I was thinking I could just use that again. In the end, it works, and there haven’t been any problems so far.
Way back when I added in the visual damage to the player…
First, I was going to set up the functionality for the ammo pickup then work on the visuals. On the player script, I added a method to be called when you get the ammo pickup. This one was pretty simple, making the ammo count = 15, making it refresh the ammo count. If I wanted to make it so it has a higher ammo count, changing it to += then a number would be better off. After that, the UI for the ammo count was updated and the method was done.
Now to call this from the powerup script. Since…
Game Developer in the making~