June 2012, updated Mar 2018, Apr 2020In a 2D top-down map it is sometimes useful to calculate which areas are visible from a given point. For example you might want to hide what’s not visible from the player’s location, or you might want to know what areas would be lit by a torch. Drag the circle around to see what’s visible from the player’s location: This algorithm can also calculate what areas