Raymond Weilacher
  • Blog
  • UX Portfolio
  • Blog
  • UX Portfolio

Sneak 'Em Up Devlog #2: Visual Acquisition

6/25/2020

0 Comments

 
The core system in any stealth game is the guard AI, specifically visual acquisition and detection of the player.
Picture
The states a guard passes through.
In Sneak 'Em Up (working title), the guards start in a patrol or standing state, while constantly scanning objects that enter a circular trigger around them.
Picture
The guard script monitors items that exist within the green circle.
Once an item enters the green circle, it goes through a gauntlet of questions to filter out only the items the guard should respond to:
  • Is the object a character, item, or the player?
  • Is it within the field of view in front of where the guard is facing?
  • Is the object large enough to be seen from its distance from the guard?
  • Are there any objects blocking the visibility of the object from the guard's position?
  • Is the object tagged as either "suspicious" or "alerting"?
  • If the object is on a team, is it a different team from the guard's?
If the object passes these requirements, a variable called "Awareness" starts to fill. The rate at which Awareness fills is based on the object's size multiplied by the distance to the object and the object's speed.
Picture
"Awareness" is defined as object size times target speed (exponential) times target distance.
In this way, fast-moving objects that are close to the guard fill his Awareness exponentially faster than stationary targets that are far away.

The visual acquisition system is designed to not be specific to just the player, to allow guards to react appropriately to characters from different factions or wild animals, as well as objects like distractions or dead bodies. Systems like these will provide more chances for the player to use the world itself as a tool of chaos and destruction.
Picture
Suspicious and Alerted states.
As awareness builds, the guard moves into first the Suspicious state, then the Alerted state. Taking--ahem--inspiration from the Metal Gear Solid series, the player receives visual feedback as to which state the guard is in. The Awareness system will be covered in more detail in the next Devlog.
0 Comments



Leave a Reply.

    Raymond Weilacher

    Writing about UX, game development, and hobbies!

    Archives

    June 2020

    Categories

    All
    AI
    GameDev

    RSS Feed

© 2020 Raymond Weilacher