top of page
Thrilling AI

Thrilling AI

An in-depth look into the AI of

Shoot to Thrill

​

Goal:

Design an AI that mimics a grunt on the set of an action movie, while still giving the player some challenge.

Introduction

Throughout my work in the final semester of my time at DigiPen, I created four different AIs for use in our game, Shoot to Thrill. I tried to make them as complex as I could for the time I had, but in some places they could still use some improvement. I designed them to be much like a generic grunt in an action movie: not really competent but still tries their hardest.

​

​

​

​

​

​

​

​

​

​

​​​

cave.png

Rifle

The Rifle enemy was the most basic enemy that I designed. It had a simple rifle that fired regularly, and it was easily defeated. I spent the most time defining this AI as it would become the building block of every other enemy. The Rifle enemy was defined by its fast shooting and somewhat common movement.

An assault rifle would shoot pretty fast, so I decided to give the enemy 30 bullets, shooting out every tenth of a second. Initially, the gun did not have any spread, but the animation of the gun idle moves the gun around enough for the bullets to be relatively random. This was a problem, though, because the bullets still went in a straight line and looked a bit awkward. The fix was to detach the spawn point from the animation and give the bullets some artificial spread.

 

The enemy also moved relatively often, the most commonly out of any type of enemy. Out of all the enemies, the Rifle had the most reason to move, trying to dodge the player’s bullets from mid-range. Instead of actually dodging, I just made the enemy pivot around the player, creating a feeling of dodging while not being too complex.

Shotgun

After the Rifle, the Shotgun enemy is the AI I worked on next. It is very similar in base structure to the Rifle, but its shooting and movement vary. It has a shotgun instead of a rifle, and it charges the player viciously to make the most use of its close-range weapon.
 

 

 

 

 

 

 

 

 

 

 


The mechanics of the shotgun were not too different from the rifle. Just spawning a ton of bullets at once, with an increased cooldown on both reloading and fire rate as well as increased spread. The bullets of the shotgun also had a higher falloff value, to make it less effective at longer ranges. This gave value to having the enemies run up to the player rather than trying to snipe them from afar. It also made it much more dangerous to have a shotgun enemy run up to you.

The Shotgun enemies tried to get as close to the player as the could to maximize damage and get in the player’s face. I accomplished this with a simple check if the enemy was within a range of the player. If not, run towards them. If so, fire at them. It was a very simple behavior that made the Shotgun enemies much more dangerous than the Rifles and made them seem different, even though they were still pretty similar.

bridge.png

Rocket

I did not spend all too much time on the Rocket enemy. It is equipped with a rocket launcher and is somewhat stationary to capitalize on the massive damage it can do. The enemy is clearly visible due to the laser that is visibly jutting from the launcher at all times, and it makes a beeping noise when the laser dot sight is close to the player.

I made the Rocket enemy slow for two very important reasons. Firstly, the player should be able to dispose of the enemy very quickly and without much effort. If left alone, they are a force to be reckoned with, capable of annihilating the player’s health in a matter of seconds. If they were also quick to dodge and run away, the game would be tiresome and frustrating. Secondly, they act as a turret, a tool to guide the attention of players towards an area. They are already very visible, both visually and audibly, so making them very stationary AIs compliments the design of having them be the focus of a room.

Thrilling AI - Drone

Drone

tunnel.png

The Drone is the most interesting AI that I designed. I had to completely restructure the behavior tree because the Drone filled a support role rather than an attacking one. The drone fills two major grievances in the game. It makes the game more challenging by making an enemy invulnerable, and it makes the game easier by allowing the player to heal.
 

 

 

 

 

 

 

 

 

 

 


The Drone’s major role is to add difficulty to an encounter. It latches onto another enemy and gives that enemy a shield. The shield makes the enemy completely impervious to damage. The only way to kill that enemy is to first kill the drone. This makes encounters with a drone considerably harder, considering the drone has a pretty small hitbox and they move pretty fast. The drone will pivot around the enemy as well as follow the enemy to maximize the difficulty in hitting the drone. In a game where enemies can go down in one or two hits, difficulty was a necessity for the game to not get boring.

The secondary role the drone filled was giving the player health pickups on death. Health was always a valuable resource within our game, and I wanted to limit the amount that players would get. I wanted to reward the player for killing drones, so health pickups were only found when killing them. This gave drones even more value as the only source of health in the game.

Conclusion

There could definitely be improvements to the AI, mainly better communication, a cover system, or improved animations and actions. The AI could have certainly used some behavior to avoid other enemies, spread out, or flank from different sides. It could have also analyzed its surroundings to find cover, and shoot at players from behind corners or behind railings. The AI could have certainly used better animations like idle stances, walking animations instead of running, better reloading (for Rocket), or even more advanced animations like crouching, dodge rolling, or many others.

The main problem I had was time and resources. I did not have the time to research how to accomplish flanking or finding cover. I did not have the resources to implement more animations. With more time and more resources, the AI could be much better, but for a game about filming an over-budget action film with underpaid actors, I think the AI plays the role pretty well.

bottom of page