Trowl – Enemy Waves

This week  I have been working on something we call Enemy Waves.

In a lot of games you have different waves of enemies. The purpose of these waves is to present a new enemy type or challenge the player in some way. Sometimes a combination of both. Our game has a total of ten waves at the moment. We thought that presenting each enemy type would be a good start of our wave system. We got three different enemy types and wanted to present these in the first three waves. First we start of by sending in the easiest enemy, the Falcon. This enemy only has one health. Next wave the player would encounter our second enemy type, the Hawk. Which has two health. And on the third wave our third and most difficult enemy type is sent in, the Eagle. This enemy has three health and therefore the most difficult one to kill. The first five waves looks like this: EnemyWaves

So, after presenting each enemy type we start to combine them in order to test and challenge the player. These first five waves works fine and is not to difficult to complete, but the rest of the waves still need reworking since some of them are way too difficult. You could say that we have a lot of play-testing ahead of us.

Enemy Waves is a class that I created which primary function is to draw out the enemies when want and to update them. This class stores references from each enemy type and power-up so I can easily access them in the Enemy Wave class. In each wave I call for a function that draws the chosen enemies and power-ups that I want the wave to contain. For each wave I have created a boolean variable which can be either false or true. When the boolean value is true, the wave is initialized. When the boolean value is false the Wave is finished and sets the next waves boolean value to true. A wave is finished when all enemies in that wave is either dead or out of screen bounds. After each wave I also have to reset the enemies position to their original one. To do this I call on a respawn function that resets their position, health and sets another boolean value to true which allows me to draw them once again.

Creating this Enemy Wave class was difficult. I had never done something like this before and therefore it took quite some time to come up with a solution that worked. At first I had a lot of issues with it causing the enemies not to respawn correctly and many other problems. But now it kinda works like a charm!

That is all for this week!

 

About Niclas Nordberg

2015 Programming