What Could Go Wrng?


Italian Trulli

This is a project that I worked on with about 30 other people over the course of a semester. My main contribution was implementing the AI for most of the enemies in the game. This meant figuring out how to implement state machines that would adhere to the desires of the designers and quickly iterating upon small changes that the designers wanted to make to the behavior of the enemies. I learned a lot about video game AI through this project including things like pathfinding and AI senses (sight, sound, etc).

Some of the more interesting enemy behaviors include stateful fleeing/hiding. One of the big problems that I had to solve was making sure enemies weren't getting stuck both on the environment and on each other when fleeing. I had to ensure that the fleeing looked realistic and wasn't just straight running away from the player and into walls. This was accomplished through a variety of line traces in multiple directions around the enemy so it could find the best path away from the player. A variation on this system ended up being used for chasing the player as well. Finally, some less exciting behavior that I implemented include patrolling, in accurate shooting, and de-clumping. Many of these behaviors are shown to the left.