Guards [Enemy AI]

Abilities

Normal → Sight (what's over there?) raycast maybe?

In unity I used gizmos to calculate a sphere around the enemy, and gave it two angles, and coded so if tag: player walked into this, face towards it and start chasing it.

In normal world, speed of the enemy should be just a tad (0.5? Play testing required to confirm) slower than the player. So player could potentially out pace the soldiers.

If soldier catch the player, restarts from checkpoint.

In Fantasy, the guard ai is like a penguin mascot, running around like a cute chubby thing, so it's run is very fun to look but it's weight and speed is very much as if it's on moon. Bouncy and slow.

No "attack" but if it catches the player, it hugs them for a second and then releases them.

In Nightmare, they are scary, but we need it not to be too scary, we need scarier options for other AIs that are more complex in terms of player challenger ratio.

Code Structure

Recommendation State Tree

Idle → look around → Sees Player → chase! Otherwise just Idle!

Appearance

Normal World

Basic Soldiers

image

Fantasy World

Think of a RUK mascot

image
image
image

Nightmare World

https://themindcircle.com/persian-demons/

image
image

Published with Nuclino