Project Spearhead

About The Project

This game is a stealth game set within medieval times, with the player acting as an expert thief. It is being developed by a team of 20+ Purdue Students as a senior capstone project, with myself being invited into it as a junior. It is very early within development, and how the final project will look is yet to be seen. The role I am serving within this project is to be developing the entire enemy AI and behavior system.

The Sound Detection System

Creating The Sound

The first step in the process for the enemy detecting the sound is to create it in a form that the enemy can read it. This is done by the creation of a temporary actor that lasts for a few seconds before it removes itself.

The sound blueprint itself contains a sphere that has the radius of one. This is so that when the sound is created, it is straightforward to how much we wish to scale it it.

The removal of the sound hitbox is done shortly thereafter, with default values that can be changed given the duration of the sound that we wish to make.

Detecting The Sound

Now that the sound has been created, now the enemy needs to interact with it so that its behavior can be altered. The scale of the sound as well as the distance to the sound is imputed into the sectional distance blueprint, which contains a calculation I made.

This sectional distance function essentially cuts a given length into several pieces, and compares another smaller length to it, seeing how many of these pieces it amounts to. For example, this sound detection system divides the radius of the sound sphere into three sections. This is then used to determine if the enemy falls within the close first section, the moderately distanced second section, or the distant third section. This is done so each section can have their own corresponding outcomes.

After this calculation, the resulting numbers are then passed over to a switch blueprint, allowing for a quick shift to the resulting behaviors. The example shown to the left for this incorporates the Suspicion System, which controls much of the behavior of this given enemy.

The reason I opted for this method for sound detection where it relies on collision events was that it is reliable, and given what the game designer team have planned in the GDD, It will not overlap any other systems.

X