Enemies and Interactions


This week I worked on developing the games main loop by implementing enemy spawning, enemy rounds, a water tide, and win / lose states for the end of the battle.


The tide mechanic happens every 10 - 50 seconds and deals damage to all of the towers. The wave also brings money in with it. Originally the wave was a solid color but I received feedback that it was that it was difficult to see what's happening in the game whenever there's a wave. In order to combat this I have made the wave semi translucent, this also makes the wave look more like a wave. The money the wave brings in also was reduced from 2 to 1 in order to balance the game more.


Enemies spawn in incrementally harder and harder rounds. Within these rounds enemies spawn in waves of different types, scaled based on a difficulty rating. Every round brings in a unit of money except for the final which is harder than the previous rounds and brings in an additional piece of money. Enemy spawning was riddled with problems, these problems were the enemies pathfinding not working, the enemies would push each other of the track, and all of the enemies would spawn as a continuous wave within a round. My first problem of enemies not pathfinding correct was due to the fact that the enemies were on a higher elevation than all of the pathfinding nodes, therefore it could never reach them. The second problem, with the enemies pushing each other, was solved by making the enemies not able to collide with each other. For the final problem I implemented waves with pauses between them, this also easily allowed the spawn point to be easily changed between waves.

The game has a win state, when the player has killed the final round of enemies, and a lose state, when the player has run out of health. These win states work on a simple condition check which then adds the end game message and pauses the game.

A problem I happened to encounter was that tag markers did not show up when I constructed the game. This problem was caused because I was using a screen resolution that was incorrect to base my measurements. Another problem with the game is a bug where sometimes towers shoot enemies outside their range. I have not fixed this problem and instead decided to focus on more immediate problems and implementing more feature.

The other feedback I received about this expansion was that enemy swarms are too hard, you have too much money, and the game is too barren. The easiest problem I temporally fixed was the money problem. To combat this I lowered the wave money to 1 instead of 2. The problem with the swarms of enemies was reduced by implementing my planned tower effects such as splash damage and piecing bullets. These tower effects both help create variation in the towers, therefore increasing the strategy elements of the game, and reduce the threat of enemy swarms in the game.

Files

BaseGame.zip Play in browser
May 05, 2023

Leave a comment

Log in with itch.io to leave a comment.