Camp Splinterwood

What's This?

Camp Splinterwood is a 3D first-person horror game developed in Unity by a team of ten Bradley University Juniors for our Game Production course. I worked as a programmer on this project with my main focus being the creation of a monster AI. This AI used a state-machine that was expandable to new behaviors in order to intelligently stalk the player throughout the game's level.

My Work

The monster lurks behind a tree before being scared off by the flashlight.

Initial Concepts

I began work on the this game's monster AI by concepting out potential solutions on paper. My primary goal here was to figure out two things: how the monster would detect light and how the monster would determine it's destination in a way that appears as if it's stalking the player. It's first iteration would primarily focus on hunting the player down directly. This iteration was meant to function as a threat with more complex behaviors being added in later.

Final State-Machine

The final version instead  prioritizes moving toward nearby objects in the environment before closing in on the player. This was done to make the monster seem more intelligent as it appeared to be stalking the player from through the environment. The monster transitions between this behavior and chasing the player down by gauging the player's position relative to itself. If the monster gets hit by a ray cast from the player's flashlight, it will run away a certain distance before hiding for a period of time. While it wasn't needed for this project, this state-machine is open to expansion with additional behaviors beyond the four pictured here.

Diagram for the final version of the state-machine.

Aggression System

Additionally, this game featured an aggression system that caused the monster get more dangerous as time went on. This system works by scaling different values related to the monster. These values include, but aren't limited to, movement speed, time spent hiding, and sensitivity to the light. To do this, the system calculates a modifier based on the player's progress through the game, their position on the map, and the power level of their flashlight.

Diagram of all the scripts related to the monster, including the aggression system.