Humans vs Zombies

This was a project for my class Interactive Media Development in the Fall of 2018. The assignment was to create a simulation of autonomous agents with steering behaviors. The scene contains humans that use wandering behavior, and when in range of a zombie switches to evade the zombie until out of range. The zombies in the scene pursue the the closest zombie and turns that human into another zombie if it catches it. If there are no humans, the zombies will wander around the scene. All of the agents in the scene avoid obstacles, which are the trees in the scene. The project was made in Unity, and all the scripts were written in C#.

Download the build!

The player can spawn in new zombies or humans at a random position on the map by pressing 'z' or 'h'. The player can also cycle through the available camera views by pressing 'c', and toggle the debug lines with 'd'.

zombie follow camera

Both the humans and zombies implement separation, so that they don't intersect each other. I also used weights and conditionals to modify the movement speeds to balance the behaviors in the scene. In addition to writing all of the gameplay scripts, I imported assets from the Unity asset store to improve the overall look.

3/4 camera

Part of the assignment was to include debug lines, which display the forward and right vectors of each agent, as well as their future position. There is also a line pointing from each zombie to it's closest target.

top down camera