Each enemy has their own separate behavior


Author: Austin Anderson
Date: 11/16/23

Problems:
Each of the enemies needed their own separate behaviors. As it was, each enemy behaved exactly the same. However, it would make the game more engaging if we had separate enemies with separate behaviors. I referred back to our design document to refresh my memory on what we had decided and realized that the drone enemies should attack the turrets, the dog enemy (now the spider enemy) should go straight for the castle, the mech enemy should prioritize blockade destruction, and the base enemy should be a "jack of all trades."

Solutions:
Based on the design document I started with the spider enemy, since I thought this would be easiest. The spider enemy moves straight to the castle unless it sees the player or hears a decoy, in which case, it will change to the target that it saw or heard.

Next was the drone enemy. Since the drone is a flying enemy, it does not move like the other enemies. Because of this, I had to move it around the walls first, before continuing on to its normal behavior. Once it is around the walls it will seek out the nearest turret and move straight to and attack this turret. If there are no turrets, the drone will move to the castle. Finally, if the drone sees or is attacked by the player, the drones will all attack the player.

The mech would become my next hurdle. This enemy prioritizes blockades, so if the mech does not hear any decoys, it will find and head toward the nearest blockade to start attacking it. If there are no blockades the mech will move straight to the castle, attacking the player on the way if it sees them.


Last but not least, we have the base enemy. I saved the base enemy for last for a couple reasons. First, most of the functionality had already been created. By creating the behaviors of the other enemies first, I now had all the functionality I needed for the base enemy. The other reason I saved the base enemy for last was because the base enemy needed to do it all. Since the base enemy was the most complex, it made sense to save it for last. The base enemy will start heading to the castle as long as it does not hear a decoy. If it sees a turret, it will attack the turret. If it sees the player, it will also attack the player. Finally, if its path is blocked, it will attack the blockades.

Get Cyber Siege

Leave a comment

Log in with itch.io to leave a comment.