
Detection Systems
The enemies have 2 ways of detecting the avatar. They can hear and they can see. If an enemy hears a sound, it will draw their attention, but they need to visually confirm the presence of the avatar to enter the Combat state.
Hearing System
The range of hearing of each enemy takes the form of a sphere centered on the enemy. The sphere has a radius.
When a sound is produced, a sphere centered on the origin of the sound is created. (the radius of that sphere is proportional to the intensity of the sound)
If both spheres collide and there isn’t a wall between the origin of the sound and the enemy, the enemy hears the sound.
For a more detailed Design Document, click here.
Vision System
The range of vision of each enemy takes the form of a cone that follows their head. The cone has a length and a width.
If the avatar is in the cone and there is nothing blocking the view between the avatar and the enemy, the enemy can see the avatar.
If the enemy sees the avatar, the detection gauge starts to fill up.
For a more detailed Design Document, click here.
Detection Gauge
Every enemy has a detection gauge that from 0 to 100.
If the enemy sees the avatar, the detection gauge starts to fill up. Depending on the distance between the avatar and the enemy, it can fill up faster or slower. If the enemy is in the Active Search State, it fills up to 100 automatically.
When the enemy stops seeing the avatar, the detection gauge starts to empty.
If the detection gauge’s level is at 100, the enemy switches to the Combat State.
For a more detailed Design Document, click here.