Difference between revisions of "Line of sight"

From RogueBasin
Jump to navigation Jump to search
(racracalor)
m (added new article: lua 2d line of sight code)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
elacoumo
One of the more popular (simple) methods of determining whether something in the game world is [[visible|visibility]] (or targetable) is to input the x,y coords for the target and the player and then walk along a line between them. At each step on the line, the game checks to see if anything is in the world at these coords that would prevent a player's sight (like a wall).
One of the more popular (simple) methods of determining whether something in the game world is [[visible|visibility]] (or targetable) is to input the x,y coords for the target and the player and then walk along a line between them. At each step on the line, the game checks to see if anything is in the world at these coords that would prevent a player's sight (like a wall).


There are a couple of articles describing how to do line of sight:
There are a couple of articles describing how to do line of sight:
* [[Bresenham's Line Algorithm]].
* [[Bresenham's Line Algorithm]]
* [[Another version of BLA]]
* [[Simple Line of Sight]]
* [[Simple Line of Sight]]
* [[Digital lines]]
* [[Digital lines]]
* [[LUA 2d Line of sight]]


[[Category:Algorithms]]
You may be searching for [[:Category:FOV]].
 
[[Category:Articles]]

Latest revision as of 22:29, 25 December 2011

One of the more popular (simple) methods of determining whether something in the game world is visibility (or targetable) is to input the x,y coords for the target and the player and then walk along a line between them. At each step on the line, the game checks to see if anything is in the world at these coords that would prevent a player's sight (like a wall).

There are a couple of articles describing how to do line of sight:

You may be searching for Category:FOV.