|
Awareness is a key feature of enemy AI in Sneak 'Em Up (working title). Once a player is detected (see the last post), the guard's awareness "meter" fills (there's no visual meter for each guard's awareness but this is something I plan on testing eventually). Awareness starts at 0 and goes to 100. Both the detection system and awareness system are designed to be target-agnostic--in other words, the AI does not solely respond to the player. This is to allow for emergent or systemic gameplay, in which the player manipulates the game world indirectly. The AI for each character is seeking out, not just the player, but anything that is suspicious, alerting, or on a different "team." The player will be able to use this to their advantage by arranging for opposing factions to fight it out, luring wild animals near enemies, or perhaps mind controlling enemy guards to cause mayhem. The rate at which awareness raises is based on several variables. Visibility (formerly called Size) is a variable on every character or notable item in Sneak 'Em Up. Highly visible objects, like the standing player character, raise awareness faster than small objects such as a pack of cigarettes tossed to lure enemies. To mimic human sight, the target's speed is a major factor in awareness as well. Finally, distance to the target raises the awareness rate exponentially. This way, if the player runs up on a guard standing around the corner, the AI will go to 100% awareness almost instantly, but a distant player will cause a slow creeping awareness. Each enemy type has a "Suspicion Threshold" and an "Alerted Threshold", which define at what Awareness level a character will go check out a suspicious sight, and what level they will become alarmed and search the area. An alerting sight that the enemy identifies as a character from another team will be met with hostility. One way to test and tweak my AI was to build a "playground" level where I could test enemy detection and awareness at different distances and with the player character in different states such as prone or hiding in tall grass. Initially enemies had a detection area that was circular in shape (see the enemies on the left in the above screenshot). However, through playtesting my own levels and watching users try the game out, I realized that the enemy was often able to see the player before the enemy was even on the screen, causing frustration for players. In the illustration above, the grey rectangle represents the aspect ratio for the vast majority of PC game players' monitors: 16:9. With a circular detection radius, guards who are to the left and right of the player work as expected, meaning they can't see you from off screen. However guards above or below your position can see and attack the player from off screen, which feels frustrating. The solution, after much tweaking, was to make the detection shape a capsule shape: Even though a player's expectation is that guards see in an even circle around them, this caused a lot of frustration and instead, a capsule shaped vision area feels more fair to the player.
1 Comment
The core system in any stealth game is the guard AI, specifically visual acquisition and detection of the player. 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. 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:
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. 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.
This post will introduce my latest game project - a top-down third person stealth action game tentatively titled Sneak 'Em Up. Currently it's a one-man-project, with me trying to tackle all aspects of game design and development. 2D stealth games are rare, and top-down stealth games even more so, and those that are top down are likely to be squad combat or turn-based. Sneak 'Em Up, on the other hand, is a top-down action game with strong stealth mechanics. The most well known games of the same style, and the major inspiration for Sneak 'Em Up, are the original 2D Metal Gear games of the late 80s and early-mid 90s. In the early Metal Gear games, you control your character from above, distracting guards and finding hiding places. Since the advent of the 3D stealth genre in 1998, 2D top-down stealth action games have been rare. Technical Details Sneak 'Em Up is built in Unity utilizing the Bolt visual scripting plugin. Bolt offers me several advantages:
Design Strategy Throughout design and development, I'll be using the "find the fun" strategy of game design--that is, iterate on the basics of gameplay to find what mechanics "work" and are enjoyable for the player, then worry about the overall game story, theme, pacing, as well as details like art style, animations, lighting, etc.
My plan is to use very basic assets to prototype mechanics and interactions and iterate/tweak those to find what type of gameplay is satisfying. Once the core gameplay loop is established, I'll then design the rest of the game around that loop, providing the player with a story arch, a possible leveling system, varied tools and weapons, and special sections that twist and vary the core gameplay loop. High fidelity art will also wait until after the core gameplay loop has been discovered. I will be creating some sprites in the meantime to practice my pixel art skills. I'm particularly proud of this guard, my second pixel art character ever! |
Raymond WeilacherThe official blog of Small Batch Miniatures Games Archives
February 2025
Categories |
RSS Feed