Sentry gun

The sentry gun is a gun that is automatically aimed and fired at targets that are detected by sensors. Fictional sentry guns have appeared in science fiction since the 1940s. Video games have provided a fertile ground for fictional visions of sentry guns. Fictional examples of automatic sentry guns have appeared since the 1980s, in films such as Aliens (1986) and the television series Æon Flux  (early 1990s).

The earliest functioning military sentry gun was the Phalanx CIWS, a radar-guided gatling gun platform that defended ships from missiles.

Literature
A sentry gun is used to pin down a group of rebelling colonists in Robert A. Heinlein's 1949 novel Red Planet. Michael Crichton's version, in the 1969 novel The Andromeda Strain, fired tranquillizer darts at intruders in the underground facility. Later, in 1995, Crichton wrote about a more advanced vision of sentry guns in his book Congo.

Video games
Video games have provided a fertile ground for visions of sentry guns. Although sentry guns first appeared in the Command & Conquer series, the Team Fortress mod for QuakeWorld solidified the sentry gun's position in gamers' vocabularies. Another early game that featured the sentry gun was Goldeneye 64. Various games—such as Duke Nukem, Metal Gear, and Worms 4: Mayhem—have several versions.

In the Team Fortress series of games the engineer class can construct and later upgrade sentry guns. The latest incarnation of the TF sentry gun starts as a high-caliber cannon, upgradeable with machine guns and rocket launchers. The spy class has a tool (the Electro-Sapper) specifically designed to neutralize sentry guns and other buildings.

Games like Timesplitters and F.E.A.R. feature sentry guns that appear as obstacles to the player, and also feature instances where the player can remotely commandeer these sentry guns to turn against enemies.

Sentry guns also play a big role in the series of Alien vs. Predator video game. In the alien-part of the game, you run many times in the line of the gunsight, and you have to find a solution to shut them down or destroy them.

In the game Battlefield 2142, the support class can unlock a sentry gun as one of its 3rd level unlocks. Squad leaders are able to employ sentry drones (also a 3rd level unlock), whose targets are designated by squad members through NetBat.

In both Half-Life and Half-Life 2, many levels involve destruction or even control of sentry guns. Portal, also made by the creators of the Half-Life game series prominently features sentry guns that deliver humorous dialogue in high-pitched electronic voices.

The game BioShock features sentry guns in machine gun, rocket launcher, and flamethrower varieties as well as security bots summoned by security cameras which are essentially sentry guns with rotors allowing them to fly like small helicopters. All sentry devices in the game are able to be hacked or bribed by the player to serve himself.

The game Perfect Dark features enemy sentry guns that must be destroyed in order to advance in the game, in addition to a player-usable version disguised as a laptop computer.

In the space-based MMORPG Eve Online, the areas surrounding stations and jump gates are lightly defended by sentry guns similar to CIWS systems. The relative security (although inefficient against a coordinated attack) enjoyed by players in the so-called "Low security space" zones, as opposed to "0.0 space" where PvP can freely occur, is largely due to the presence of these sentry guns.

In the space-based PC game Freelancer jump gates, trade lane rings and space stations are equipped with low-power sentry guns, however, they are called turrets and thus may be human-operated.

Descent Freespace and Freespace 2 are also noted for having sentry guns. The Terran, Vasudan, and Shivan races all have their own sentry guns, with the GTSG Mjolnir class being specifically designed to take down enemy warships with a large beam weapon.

In Crysis' multiplayer Power Struggle mode there are sentry guns equipped with machine guns and missile launchers to prohibit the player from entering the enemy base.

In the game Call of Duty Modern Warfare 2, a Sentry Gun is awarded to a player who achieves a five killstreak in a life without dying.

In Homeworld and Homeworld 2 3D RTS game, many captital spaceship protect itself using CWIS (point defense system). in addition, sentry probes can be placed around the map which will become immobile, and shoots anything near it.

Sentry Guns are also a reward given to players in the multi-player mode of Call of Duty: Modern Warfare 2, if having picked the correct option the player can place one of these on the map after having killed 5 other players in a row. This fictional weapon is designated the M117 Sentry.

Film and television
Fictional examples of automatic sentry guns also appeared in the Special Edition version of Aliens. In the film, marines who were surrounded by hostile alien creatures barricaded themselves into a sick bay facility, and deployed sentry guns to block access points to the sick bay. The weapons successfully repelled the alien adversaries until they ran out of ammunition. All references to this sequence were deleted from the theatrical print of the film, though Alan Dean Foster's 1986 novelisation of the movie contained this scene. The sentry gun sequence was reinstated for the extended Special Edition cut of the film, released initially on VHS in 1988 and much later on DVD.

As mentioned above, the film adaptation of Congo depicted a fictional laser-sighted remote sentry unit, which was used to repel the enemies. The science fiction television series Æon Flux depicted accurate sentry guns in multiple episodes. In the show, these guns, along with concrete walls, are depicted as a series of Fortifications separating two nations.

Phalanx close-in weapons systems
The earliest functioning sentry gun was the Phalanx close-in weapons system (CIWS), a radar-guided gatling gun platform that defends ships from missiles. There is a land-based version of the Phalanx CIWS, also used for missile defense. Similar to the Phalanx is the Goalkeeper CIWS, a more powerful version with the same purpose. According to the United States Navy, Phalanx is the only deployed close-in weapon system capable of autonomously performing its own search, detect, evaluation, track, engage and kill assessment functions These guns perform sentry duty against missiles, but are not in line with the fictional versions of the sentry gun that are used primarily against humans in books, movies, and video games.