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

Role-playing game 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.

<i>Phantasy Star</i> (video game) 1987 role-playing 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.

Miniature wargaming Wargame genre

Miniature wargaming is a form of wargaming in which players enact battles between opposing military forces that are represented by miniature physical models. 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.

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. 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 replayability 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.

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.

Dungeon crawl video game genre

A dungeon crawl is a type of scenario in fantasy role-playing games in which heroes navigate a labyrinth environment, battling various monsters, avoiding traps, solving puzzles, and looting any treasure they may find. Video games which predominantly feature dungeon crawl elements are considered to be a genre.

An adventure is either a published or otherwise written collection of plot, character, and location details used by a gamemaster to manage the plot or story in a role-playing game. Each adventure is based upon a particular gaming genre and is normally designed for use with a specific game or gaming system. However, skilled gamemasters can often convert an adventure to different game systems, and many adventures are designed with such conversions in mind.

In miniature wargaming, players enact simulated battles using scale models called miniature models, which can be anywhere from 2 mm 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>Champions of Norrath</i> 2004 video game

Champions of Norrath: Realms of EverQuest is an action role-playing video game for the PlayStation 2, set in the EverQuest universe. It is playable with one single player or cooperative for up to four players. However, with a Network Adapter, players can take the game online with others and kill others or join to form groups of adventurers. The game uses a re-worked and expanded Baldur's Gate: Dark Alliance game engine. A sequel was created called Champions: Return to Arms which was released in February 2005.

<i>Chainmail</i> (game) wargame which was the precursor to Dungeons & Dragons

Chainmail is a medieval miniature wargame created by Gary Gygax and Jeff Perren. Gygax developed the core medieval system of the game by expanding on rules authored by his fellow Lake Geneva Tactical Studies Association (LGTSA) member Perren, a hobby-shop owner with whom he had become friendly. Guidon Games released the first edition of Chainmail in 1971 as its first miniature wargame and one of its three debut products. Chainmail was the first game designed by Gygax that was available for sale as a professional product. It included a heavily Tolkien-influenced "Fantasy Supplement", which made Chainmail the first commercially available set of rules for fantasy wargaming, though it follows many hobbyist efforts from the previous decade. Dungeons & Dragons began as a Chainmail variant, and Chainmail pioneered many concepts later used in Dungeons & Dragons, including armor class and levels, as well as various spells, monsters and magical powers.

Hex map 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.

History of role-playing games

The history of role-playing games begins with an earlier tradition of role-playing, which combined with the rulesets of fantasy wargames in the 1970s to give rise to the modern role-playing game. A role-playing game (RPG) is a type of game in which the participants assume the roles of characters and collaboratively create stories. Participants determine the actions of their characters based on their characterization, and the actions succeed or fail according to a system of rules and guidelines. Within the rules, they may improvise freely; their choices shape the direction and outcome of the games.

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.

The Cleric, Priest, or Bishop is a character class in Dungeons & Dragons and other fantasy role-playing games. The cleric is a healer, usually a priest and a holy warrior, originally modeled on or inspired by the Military Orders. Clerics are usually members of religious orders, with the original intent being to portray soldiers of sacred orders who have magical abilities, although this role was later taken more clearly by the paladin. Most clerics have powers to heal wounds, protect their allies and sometimes resurrect the dead, as well as summon, manipulate and banish undead.

A random dungeon is a dungeon in a role-playing video game which is procedurally generated by the computer using an algorithm, such that the dungeon is laid out differently every time the player enters it, and a player often never plays through quite the same dungeon twice, as there are innumerable possibilities for how they generate.

<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.

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.


  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".