Line of sight (video games)

Last updated

Line of sight, sometimes written line-of-sight or abbreviated to LoS, is the visibility (that is, who can see what) on the playing field in wargames and some role-playing games (RPGs). Many abilities can only be used on entities within a character's 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).


A tank 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 shooters, strategy games, stealth games, and role-playing video games. In simplistic games with a top-down perspective, such as roguelikes, 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. [1]

In some live action role-playing games, such as NERO International, the line of sight is used as the duration for some spells and abilities. For example, a paralyze spell only lasts as long as the target remains within line of sight of the spell's caster.

On the other hand, line of sight can be used offensively, like luring a player behind a pillar in order to set a trap - his teammate, being out of line of sight, 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. [2] [ clarification needed ]

Related Research Articles

<i>Castle of the Winds</i> 1989 video game

Castle of the Winds is a tile-based roguelike video game for Microsoft Windows. It was developed by Rick Saada in 1989 and distributed by Epic MegaGames in 1993. The game was given around 1998 into the public domain and provided as Freeware download by the author. Though it is secondary to its hack and slash gameplay, Castle of the Winds has a plot loosely based on Norse mythology, told with setting changes, unique items, and occasional passages of text. The game is composed of two parts: A Question of Vengeance, released as shareware, and Lifthransir's Bane, sold commercially. A combined license for both parts was also sold.

<span class="mw-page-title-main">Role-playing game</span> Game in which players assume the roles of characters in a fictional setting

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 regarding character development. Actions taken within many games succeed or fail according to a formal system of rules and guidelines.

<span class="mw-page-title-main">Wargame</span> Strategy game that realistically simulates war

A wargame is a strategy game in which two or more players command opposing armed forces in a realistic simulation of an armed conflict. Wargaming may be played for recreation, to train military officers in the art of strategic thinking, or to study the nature of potential conflicts. Many wargames recreate specific historic battles, and can cover either whole wars, or any campaigns, battles, or lower-level engagements within them. Many simulate land combat, but there are wargames for naval and air combat as well.

<i>Phantasy Star</i> (video game) 1987 video game

Phantasy Star is a role-playing video game (RPG) developed by Sega and released for the Master System in 1987. One of the earliest Japanese RPGs for consoles, Phantasy Star tells the story of Alis on her journey to defeat the evil ruler of her star system, King Lassic, after her brother dies at his hands. She traverses between planets, gathering a party of fighters and collecting the items she needs to avenge her brother's death and return peace to the star system. The gameplay features traditional Japanese RPG elements including random encounters and experience points. All the characters have predefined personalities and abilities, a unique element compared to the customizable characters of other RPGs of the era.

<span class="mw-page-title-main">Dave Arneson</span> 20th and 21st-century American game designer

David Lance Arneson was an American game designer best known for co-developing the first published role-playing game (RPG), Dungeons & Dragons, with Gary Gygax, in the early 1970s. Arneson's early work was fundamental to the development of the genre, developing the concept of the RPG using devices now considered to be archetypical, such as adventuring in "dungeons" and using a neutral judge who doubles as the voice and consciousness of all characters aside from the player characters to develop the storyline.

<span class="mw-page-title-main">Miniature wargaming</span> Wargame genre

Miniature wargaming is a form of wargaming in which military units are represented by miniature physical models on a model battlefield. The use of physical models to represent military units is in contrast to other tabletop wargames that use abstract pieces such as counters or blocks, or computer wargames which use virtual models. The primary benefit of using models is aesthetics, though in certain wargames the size and shape of the models can have practical consequences on how the match plays out.

<span class="mw-page-title-main">Role-playing video game</span> Video game genre

A role-playing video game is a video game genre where the player controls the actions of a character immersed in some well-defined world, usually involving some form of character development by way of recording statistics. Many role-playing video games have origins in tabletop role-playing games and use much of the same terminology, settings and game mechanics. Other major similarities with pen-and-paper games include developed story-telling and narrative elements, player character development, complexity, as well as replay value and immersion. The electronic medium removes the necessity for a gamemaster and increases combat resolution speed. RPGs have evolved from simple text-based console-window games into visually rich 3D experiences.

In tabletop games and video games, a character class is a job or profession commonly used to differentiate the abilities of different game characters.

A random encounter is a feature commonly used in various role-playing games whereby combat encounters with non-player character (NPC) enemies or other dangers occur sporadically and at random, usually without the enemy being physically detected beforehand. In general, random encounters are used to simulate the challenges associated with being in a hazardous environment—such as a monster-infested wilderness or dungeon—with uncertain frequency of occurrence and makeup. Frequent random encounters are common in Japanese role-playing games like Dragon Quest, Pokémon, and the Final Fantasy series.

<span class="mw-page-title-main">Miniature model (gaming)</span> Small-scale model used in miniature wargaming

In miniature wargaming, players enact simulated battles using scale models called miniature models, which can be anywhere from 2 to 54 mm in height, to represent warriors, vehicles, artillery, buildings, and terrain. These models are colloquially referred to as miniatures or minis.

<i>Ultima III: Exodus</i> 1983 video game

Ultima III: Exodus is the third game in the series of Ultima role-playing video games. Exodus is also the name of the game's principal antagonist. It is the final installment in the "Age of Darkness" trilogy. Released in 1983, it was the first Ultima game published by Origin Systems. Originally developed for the Apple II, Exodus was eventually ported to 13 other platforms, including a NES/Famicom remake.

<i>Tanktics: Computer Game of Armored Combat on the Eastern Front</i> 1976 video game

Tanktics: Computer Game of Armored Combat on the Eastern Front, also named Wargy I, is a 1976 two-player tank battle video game by Chris Crawford. It was Crawford's first video game; it was initially sold directly by him since its initial creation in 1976, as published by Avalon Hill in 1981 under the name Tanktics. The game has no graphics; the player moves tokens on a physical map to represent a tank battle, with the computer controlling one of the sides. The game received weak reviews by critics, who found the artificial intelligence to be weak and suited for players who wanted neither a complex nor fast-paced game.

<span class="mw-page-title-main">Hex map</span> Map subdivided into a hexagonal tiling, small regular hexagons of identical size

A hex map, hex board, or hex grid is a game board design commonly used in wargames of all scales. The map is subdivided into a hexagonal tiling, small regular hexagons of identical size.

Dungeon was one of the earliest role-playing video games, running on PDP-10 mainframe computers manufactured by Digital Equipment Corporation.

Computer-assisted gaming (CAG) and computer-assisted wargaming (CAWG) refer to games which are at least partially computerized, but where on important part of the action is not virtual but performed in real life or on a miniature terrain. Regulation of the game can be done completely by a computer or partly deferred to a human referee. Computer-assisted gaming attempts to combine the advantages of PC games with those of face-to-face games. In computer-assisted gaming, computers are used for recordkeeping and sometimes for the resolution of combat, but a Human referee makes any decisions requiring judgement.

Turn-based tactics (TBT), or tactical turn-based (TTB), is a computer and video game genre of strategy video games that through stop-action simulates the considerations and circumstances of operational warfare and military tactics in generally small-scale confrontations as opposed to more strategic considerations of turn-based strategy (TBS) games.

<i>Telengard</i> Dungeon crawler computer game from 1982

Telengard is a 1982 role-playing dungeon crawler video game developed by Daniel Lawrence and published by Avalon Hill. The player explores a dungeon, fights monsters with magic, and avoids traps in real-time without any set mission other than surviving. Lawrence first wrote the game as DND, a 1976 version of Dungeons & Dragons for the DECsystem-10 mainframe computer. He continued to develop DND at Purdue University as a hobby, rewrote the game for the Commodore PET 2001 after 1978, and ported it to Apple II+, TRS-80, and Atari 800 platforms before Avalon Hill found the game at a convention and licensed it for distribution. Its Commodore 64 release was the most popular. Reviewers noted Telengard's similarity to Dungeons and Dragons. RPG historian Shannon Appelcline noted the game as one of the first professionally produced computer role-playing games, and Gamasutra's Barton considered Telengard consequential in what he deemed "The Silver Age" of computer role-playing games preceding the golden age of the late 1980s. Some of the game's dungeon features, such as altars, fountains, teleportation cubes, and thrones, were adopted by later games such as Tunnels of Doom (1982).

Implicit <i>k</i>-d tree

An implicit k-d tree is a k-d tree defined implicitly above a rectilinear grid. Its split planes' positions and orientations are not given explicitly but implicitly by some recursive splitting-function defined on the hyperrectangles belonging to the tree's nodes. Each inner node's split plane is positioned on a grid plane of the underlying grid, partitioning the node's grid into two subgrids.

A min/max kd-tree is a k-d tree with two scalar values - a minimum and a maximum - assigned to its nodes. The minimum/maximum of an inner node is equal to the minimum/maximum of its children's minima/maxima.

<span class="mw-page-title-main">Tabletop role-playing game</span> Form of role-playing game using speech

A tabletop role-playing game, also known as a pen-and-paper role-playing game, is a form of role-playing game (RPG) in which the participants describe their characters' actions through speech. Participants determine the actions of their characters based on their characterization, and the actions succeed or fail according to a set formal system of rules and guidelines. Within the rules, players have the freedom to improvise; their choices shape the direction and outcome of the game.


  1. Bernardt Duvenhage "Using An Implicit Min/Max KD-Tree for Doing Efficient Terrain Line of Sight Calculations" in "Proceedings of the 6th International Conference on Computer Graphics, Virtual Reality, Visualisation and Interaction in Africa", 2009.
  2. "StraightEdge, a 2D polygon library for games".