The Last Commando
You are the last elite space commando, stranded on an alien planet, surrounded by enemies. All you have is your trusty blaster, your advanced battle armor, and a heap of grenades. Can you survive all the enemy waves and come out victorious?
Enemy Design
This game has a simple map scattered with walls and only one weapon without any upgrades, so all the gameplay variety comes from the enemies and how they are used together. Below I explain the four enemy types, their role in the game, and ways I could improve this simple game.
Swarmer
The swarmer is the first and most basic enemy type. Its job is to charge straight at the player and swarm them. The AI is simply using the A* pathfinding algorithm to run towards the player as fast and directly as possible. The swarmers are not much of a threat against the player, but they force them to keep moving and provide a distraction from the more dangerous enemies. The player often has to make a choice to focus on the swarmers or try to eliminate the tougher enemies first.
Shooter
The shooter is the primary ranged enemy in the game. Their AI woks by pathfinding their way towards the player. They keep moving until two conditions are met: they are within attack range of the player, and they are within line of sight of the player. If both of these are true, they stop and shoot. The shooters are the enemy that most often damages and kills the player. Shooters can’t defend themselves well, but because of their range they often are hiding behind swarmers and within shield bubbles, making them a tough target to reach.
Shield
The shield enemy has no form of attack, but creates an indestructible shield around itself to provide cover to other enemies. The shield will block all shots trying to enter it, but will allow shots leaving from within. The player can circumvent the shield in two ways. They can either enter the shield so they can shoot whoever is inside (including the shield enemy itself), or they can throw grenades through the shield, but they have a limited number of those. The shield enemy AI works exactly like the shooter AI, except the distance away from the player they stop is slightly further away. This combined with the fact that shield and shooter enemies are spawned next to each other makes it look like they’re in coordination together. The shield enemy will stay behind the shooters, but be close enough to cover them with the shield. This creates the illusion of cooperation, even though the AIs don’t know each other exist.
Artillery
The artillery enemy AI works exactly like the shield AI, but it stays a little farther away. The role of the artillery is to keep the player moving and punishing them for not paying attention. When in range of the player, the artillery will target a location on the ground where the player is standing. A moment later, the artillery shell will land, creating an explosion and damaging the player if too close. The artillery provides a lot of damage output, but when alone they are little threat to the player.
How To Improve
The four enemy types all have different roles and combine to create a dynamic challenge for the player, but many improvements could be made. As you see, the AI is incredibly simple and some more complicated decision making could add a lot. Making enemies flank the player or retreat when not doing well could make the battlefield feel much more dynamic. I could also reduce the amount of tougher enemies in play at any given time, instead of always generating huge swarms. When too many enemies pile up, the game gets hectic; and when multiple shields overlap, the combat starts to feel unfair.