Line of sight (gaming)
Encyclopedia
Line of sight, sometimes written line-of-sight or abbreviated to LoS, is a term used in wargames
and some role-playing game
s (RPGs). It refers to visibility (that is, who can see what) on the playing field. Many abilities can only be used against an enemy within line of sight.
In some games, miniature figures are used to determine line of sight. Many wargames use counters
to represent units and determine line of sight. A common technique is to hold a length of thread between two counters. If the thread, held straight, doesn't encounter any obstacles, the line of sight is valid.
The first computer game to implement line of sight graphics was Dungeon, which was played on a PDP-10
mainframe computer
(1975).
behind a tall hill would not be able to see an enemy tank on the other side of the hill. Therefore, the first tank does not have a "line of sight" to the enemy tank. Conversely, a squad of soldiers atop the hill may be able to see both tanks, though the tanks may not be able to see them (since the tank's upward line of sight is limited).
In an RPG, players may not see doors, objects or monsters located around the corner in a dungeon
.
Line of sight is crucial to many types of video games, including, but not limited to, first-person shooter
s, strategy game
s, computer role-playing games and console role-playing games. In simplistic games with a top-down perspective, such as roguelike
s, Bresenham's line algorithm
can be used to determine line of sight. In first person games such as battlefield and flight simulators an implicit min/max kd-tree
may be used to efficiently evaluate terrain line of sight
queries.
In some live-action role-playing games, such as NERO International
, line of sight is the duration for some spells and abilities. A paralyze spell, for example, only lasts as long as the caster remains within line of sight of the spell's target.
In World of Warcraft
players use pillars or other structures to "line of sight" enemy players (any ranged class), making it almost impossible for them to harm them and when an enemy mêlée
player attacks them, they simply run around playing cat and mouse around the pillar.
On the other hand, LoS can be used offensively, like dragging a player behind a pillar in order to set a trap - his team mate, being out of LoS, won't be able to help out until he gets in LoS, which in turn takes time. This time is usually the key moment to strike and go for a kill, if said player falls in said trap.
One algorithm for calculating 2-dimensional line of sight is given in the StraightEdge project
Wargaming
A wargame is a strategy game that deals with military operations of various types, real or fictional. Wargaming is the hobby dedicated to the play of such games, which can also be called conflict simulations, or consims for short. When used professionally to study warfare, it is generally known as...
and some role-playing game
Role-playing game
A role-playing game is a game in which players assume the roles of characters in a fictional setting. Players take responsibility for acting out these roles within a narrative, either through literal acting, or through a process of structured decision-making or character development...
s (RPGs). It refers to visibility (that is, who can see what) on the playing field. Many abilities can only be used against an enemy within line of sight.
In some games, miniature figures are used to determine line of sight. Many wargames use counters
Counter (board wargames)
Boardgame counters are usually small cardboard squares moved around on the map of a wargame to represent armies, military units or individual military personnel. The first modern mass-market wargame, based on cardboard counters and hex-board maps, was Tactics, invented by Charles S. Roberts in 1952...
to represent units and determine line of sight. A common technique is to hold a length of thread between two counters. If the thread, held straight, doesn't encounter any obstacles, the line of sight is valid.
The first computer game to implement line of sight graphics was Dungeon, which was played on a PDP-10
PDP-10
The PDP-10 was a mainframe computer family manufactured by Digital Equipment Corporation from the late 1960s on; the name stands for "Programmed Data Processor model 10". The first model was delivered in 1966...
mainframe computer
Mainframe computer
Mainframes are powerful computers used primarily by corporate and governmental organizations for critical applications, bulk data processing such as census, industry and consumer statistics, enterprise resource planning, and financial transaction processing.The term originally referred to the...
(1975).
Examples
A tankTank
A tank is a tracked, armoured fighting vehicle designed for front-line combat which combines operational mobility, tactical offensive, and defensive capabilities...
behind a tall hill would not be able to see an enemy tank on the other side of the hill. Therefore, the first tank does not have a "line of sight" to the enemy tank. Conversely, a squad of soldiers atop the hill may be able to see both tanks, though the tanks may not be able to see them (since the tank's upward line of sight is limited).
In an RPG, players may not see doors, objects or monsters located around the corner in a dungeon
Dungeon crawl
A dungeon crawl is a type of scenario in fantasy role-playing games in which heroes navigate a labyrinthine environment, battling various monsters, and looting any treasure they may find...
.
Line of sight is crucial to many types of video games, including, but not limited to, first-person shooter
First-person shooter
First-person shooter is a video game genre that centers the gameplay on gun and projectile weapon-based combat through first-person perspective; i.e., the player experiences the action through the eyes of a protagonist. Generally speaking, the first-person shooter shares common traits with other...
s, strategy game
Strategy game
A strategy game or strategic game is a game in which the players' uncoerced, and often autonomous decision-making skills have a high significance in determining the outcome...
s, computer role-playing games and console role-playing games. In simplistic games with a top-down perspective, such as roguelike
Roguelike
The roguelike is a sub-genre of role-playing video games, characterized by randomization for replayability, permanent death, and turn-based movement. Most roguelikes feature ASCII graphics, with newer ones increasingly offering tile-based graphics. Games are typically dungeon crawls, with many...
s, Bresenham's line algorithm
Bresenham's line algorithm
The Bresenham line algorithm is an algorithm which determines which points in an n-dimensional raster should be plotted in order to form a close approximation to a straight line between two given points...
can be used to determine line of sight. In first person games such as battlefield and flight simulators an implicit min/max kd-tree
Min/max kd-tree
A min/max kd-tree is a kd-tree with two scalar values - a minimum and a maximum - assigned to its nodes. The minimum/maximum of an inner node is equal the minimum/maximum of its children's minima/maxima.-Construction:...
may be used to efficiently evaluate terrain line of sight
Line of sight (gaming)
Line of sight, sometimes written line-of-sight or abbreviated to LoS, is a term used in wargames and some role-playing games . It refers to visibility on the playing field. Many abilities can only be used against an enemy within line of sight.In some games, miniature figures are used to determine...
queries.
In some live-action role-playing games, such as NERO International
NERO International
-Overview:NERO International is a live action role-playing game played in the United States and Canada. The NERO name originally was an acronym for "New England Role playing Organization", but the game has expanded well beyond its original New England roots and thus simply adopted the acronym as...
, line of sight is the duration for some spells and abilities. A paralyze spell, for example, only lasts as long as the caster remains within line of sight of the spell's target.
In World of Warcraft
World of Warcraft
World of Warcraft is a massively multiplayer online role-playing game by Blizzard Entertainment. It is the fourth released game set in the fantasy Warcraft universe, which was first introduced by Warcraft: Orcs & Humans in 1994...
players use pillars or other structures to "line of sight" enemy players (any ranged class), making it almost impossible for them to harm them and when an enemy mêlée
Mêlée
Melee , generally refers to disorganized close combat involving a group of fighters. A melee ensues when groups become locked together in combat with no regard to group tactics or fighting as an organized unit; each participant fights as an individual....
player attacks them, they simply run around playing cat and mouse around the pillar.
On the other hand, LoS can be used offensively, like dragging a player behind a pillar in order to set a trap - his team mate, being out of LoS, won't be able to help out until he gets in LoS, which in turn takes time. This time is usually the key moment to strike and go for a kill, if said player falls in said trap.
One algorithm for calculating 2-dimensional line of sight is given in the StraightEdge project