About This File
Sentinel AI – Technical Description
The Sentinel is an AI enemy built around a state-based behaviour system, featuring perception, target acquisition, investigation and combat logic that allow it to dynamically react to the player's position and actions.
The AI includes:
- Patrol system: the Sentinel can follow a predefined sequence of navigation points, with configurable behaviours when reaching the end of the path, such as looping or reversing direction.
- Field of View system: I implemented a configurable vision cone with a near detection zone and a secondary, longer-range detection zone. The FOV is also visually represented in the game.
- Target detection: the Sentinel evaluates potential targets based on distance, FOV angle and line of sight, preventing detection through environmental obstacles.
- Investigation behaviour: when a target is detected at longer range, instead of immediately attacking, the Sentinel can move toward the detected position and enter an attention/control state.
- Dynamic pursuit: once a target is confirmed, the AI switches to a chase state and continuously updates its behaviour according to the target's distance and visibility.
- Maximum pursuit distance: I implemented a distance limit that causes the Sentinel to abandon a target when it moves too far away, returning the AI to its idle behaviour.
- Combat decision system: the Sentinel selects between ranged combat and melee combat according to the distance from the target.
- Ranged attack: when the target is within the appropriate shooting range and remains visible, the Sentinel enters a shooting state and fires a projectile.
- Melee attack: at close range, the AI switches to melee combat and applies damage after a configurable attack delay.
- Reactive behaviour: if the Sentinel is attacked while it has no current target, it automatically identifies the attacker as its new target and begins pursuit.
- State machine: the behaviour is organised through multiple AI states, including idle, patrol, investigation/control, chase, ranged attack, melee attack, retreat and death, with transitions determined by the current game conditions.
Overall, the Sentinel demonstrates a custom perception and decision-making system, combining field-of-view detection, visibility checks, target prioritisation, state transitions, pursuit logic and context-dependent combat behaviour.
What's New in Version 08/26/26 02:17 PM See changelog
Released
No changelog available for this version.