Shadow casting

From RogueBasin
(Difference between revisions)
Jump to: navigation, search
m (added libtcod)
m (I don't think category + subcategory are both needed at the same time.)
Line 31: Line 31:
* [[libtcod]]
* [[libtcod]]

Revision as of 07:51, 22 March 2009


What is Shadow Casting?

Shadow casting is a way to implement Field of Vision. In shadow casting, a destination square is visible from a source square if there exists an unobstructed line from the center of the source square to any point in the destination square. There are several efficient algorithms to accomplish this, including two which only visits squares that are visible (Spiral Path FOV and FOV using recursive shadowcasting).


  • Moderately easy to implement
  • Efficient
  • Existing library


  • Some artifacts (corners of rooms, for example).
  • Non-symmetric, making it awkward for some implementations of ranged combat.

How do I implement it?

What games use it?

Most modern games use shadow casting.

What libraries implement it?

Personal tools