Mechanical Breakdown: Enemy Behavior
It's no secret that a stealth game is only as strong as its enemy AI, and teaching the guards to think was by far the most challenging part of this project. Before I began work on the AI, I played a plethora of stealth games such as Thief and Metal Gear Solid (where the main inspiration for this project came from). While playing these games, I studied how the guards reacted to the player and made decisions. For this project, I tried to boil down the AI to its basic functions, laying down a foundation to build upon later.
The Basics of Guard AI
At their core, the guards' AI is driven by three difference states: Default, Suspicious, and Alerted. In their default states, guards patrol their pre-set routes until the player enters their vision cone. When the player steps into the guard's vision, the guard changes to the Suspicious state, and their internal suspicion meter begins to rise. If the player manages to step out of their sight before their suspicion meter fills, their suspicion will decrease over time. Additionally, if the suspicion meter is above a certain threshold, the guard will investigate and look around the player's last position. However, if the meter is filled, the guard is Alerted and will alert nearby guards to the player's location. While the Alert status is active, guards in range of the player will stop and fire on the player. Once the player exits their range, they will continue to chase until the player outruns them, then return to their patrol (with full suspicion meters). Finally, if the player remains out of sight for the remainder of the alert phase, the guards' return to Default state and suspicion begins to fall.
Get Prototype: Odysseus
Prototype: Odysseus
More posts
- Mechanical Breakdown: Designing Player AbilitiesDec 13, 2024
- VFX Breakdown: Let's Go Retro!Dec 13, 2024
- Devlog #1: Project Introduction!Dec 13, 2024
Leave a comment
Log in with itch.io to leave a comment.