Ray casting

From RogueBasin
Revision as of 06:31, 27 April 2007 by Duerig (Talk | contribs)

Jump to: navigation, search

Contents

What is Ray Casting?

Ray casting is a method for calculating Field of Vision where rays are traced from the center of a source square to a select number of destination squares. Squares are marked as visible as the rays pass through them, and walls will block the rays.

There are a few ways to decide where rays are to be cast:

  • Every potential destination -- This method is very slow, but results in a crude approximation of Shadow Casting.
  • Every square along the perimeter of the area being checked for Field of Vision -- This is faster, but causes an incre