Black Mesa – Stealth Elements and Enemy AI Detection in Black Mesa

black-mesa

I would like to know what stealth elements are in Black Mesa and how does the enemy AI detect the player.

Specifically, I would like to know if:

  • Can enemies detect by sound?

    • Will weapon sounds (gunfire, grenade explosion, crowbar hit sound) alert them? (even if not hitting them, but are within their earshot)
    • Will walking or crouch walking lessen sound (compared to sprinting)?
  • Can enemies detect light levels?

    • Do enemies detect light from the flashlight (and are you more likely to be detected with the flashlight on)?
    • Will hiding in dark places work?
  • Do enemies see behind their backs (i.e. Can you can sneak up on them if their backs are turned to you)?

  • Does hiding behind objects work (or do enemies see through objects)?
  • Are enemies alerted forever? (i.e. If they detected you, will they be permanently be on alert for you, or will they go back to their previous routine once you have been out of their sight for some time)
  • Do enemies alert each other if one of them has sighted you (or is detection, per individual enemy unit)?
  • Does the enemy notice you if you are near their vicinity (relative to enemy's location) or is enemy detection of the player scripted (fixed), and you can't avoid detection once you are in a certain area?

Yes, I realize I have too many questions. Please bear with me. I just don't want to waste my efforts going all ninja if the enemy will be able to detect me, anyway.

Best Answer

None of the Half Life series has stealth mechanics as such. Enemy pathing and detection work on the old-school model that goes back into the dim history of shooters: you get close enough, or you hit them, and they activate. The HL series refines this with a relatively sophisticated AI suite, but it wasn't built with a modern stealth-mechanic paradigm in mind. It is a descendant of run-and-gun shooters, with some primitive stealth options tacked on to make it more believable, but the intended play-style is still a close cousin to Doom.

Without a unified stealth subsystem, the "detection" mechanics, such as they are, are baked into the individual AI of enemies. For example, soldiers will search for you and not go passive even if you're out of sight; headcrab zombies will aggro if you're near but forget about you if you get away and out of line of sight; Xen fauna will go about their own business if you get away from them.

Some principles from personal experience:

  • Line of sight matters, and so does enemy facing
  • Gunshots will alert nearby enemies and they will zero in on your location
  • Movement noise is not part of the game: you can jump on plinky sheet-metal all you like and you won't be noticed
  • Light (including the flashlight) doesn't seem to be part of the mechanics
  • Get far enough away from an active enemy and they'll behave differently – how depends on their AI
  • Get out of LOS of an active enemy and they'll behave differently – again depending on individual AI
  • Walls block LOS differently than environmental objects – hide behind a crate and they will target you in your cover, hide in a different room and they will start to lose your location
  • Soldier AI is not to be underestimated – they react to sight and gunfire sound in an organised way, and react realistically to discovered charges and incoming grenades
  • Some enemies are individually activated, while some will alert each other (soldiers in particular)
  • Some zones have unique event-driven scripting to handle enemy detection and activation, to make it work more in line with the situation or plot than the built-in AI can by itself
  • Apart from the scripted exceptions, activation is AI-based – if an enemy wanders from their position, you can infiltrate; in general though, enemies are usually standing guard and don't wander much

So you can "stealth" to some degree, but sneaking up on enemies is less the "creep up and backstab" kind of stealth and more the "sneak into a good position and then open up with guns blazing" kind of stealth that predates game series like Thief, Assassin's Creed, or the later Elder Scrolls.