Not just a video game mechanic, the sentry gun has crossed the barrier from science fiction into reality. One of the earliest appearances of the idea in mainstream culture is was in the director's cut of the movie Aliens which clearly defined the shape and design of sentry guns in all types of media thereafter, including the examples in Team Fortress Classic and Half-Life 2. Aaron and Eric Rasmussen, the creators of a robotic sentry gun based on commodity personal computer parts, an Airsoft gun and some hobby servos, cited Michael Crichton's Congo as their personal inspiration.1 The use of an Airsoft gun is notable simply because of their similarity to authentic weaponry; if it can be done with one of those, it can be done with the real thing.

The concept of the sentry gun is fairly simple: recognize a valid target, point a firearm at it, and fire. Weapons tracking can be performed via stepper motor (where the aim of the weapon at a given degree and inclination is known) or with the use of visual corrections methods, possibly involving a targeting scope or a LASER sight. The greatest obstacle to overcome is the issue of computer vision; when firing a deadly weapon the issue of false positives becomes an extremely serious one, while false negatives have the potential to make the device useless. While it does not substantially reduce the difficulty of the project, it is also possible to use millimeter-wave RADAR as a sensor for such a system, which mitigates some obvious drawbacks of the use of an optical sensor, such as blinding.

A variant of the sentry gun, the point defense system tracks incoming projectiles or other weaponry, and fires upon it in order to destroy it before it reaches the target, to which the system is mounted. The primary example is the Phalanx "Close-In Weapons System" used by the US military, which utilizes a 20mm gatling gun and multiple sensors including visual, thermal, and electromagnetic types.2

Sentry guns raise ethical concerns similar to land mines; if left unattended they potentially present a hazard to human life well after their intended operational lifespan.

References:

  1. Robotic Sentry Gun From USMechatronics. Technovelegy.com, retrieved 200904130841 PST. (http://www.technovelgy.com/ct/Science-Fiction-News.asp?NewsNum=502)
  2. MK 15 Phalanx Close-In Weapons System (CIWS). FAS Military Analysis Network, retrieved 200904150705 PST. (http://www.fas.org/man/dod-101/sys/ship/weaps/mk-15.htm)
Thanks to rootbeer277 for noting that the sentry guns do not appear in the theatrical release of Aliens, and to smartalix for reminding me about the phalanx.