Field of Vision

From RogueBasin
(Difference between revisions)
Jump to: navigation, search
(added SquidLib to list of FoV libraries)
m (fixed link to author's correct page)
Line 28: Line 28:
 
== Available Libraries ==
 
== Available Libraries ==
  
* [[SquidLib]] is a [[Java]] library made by [[Deej | Eben Howard]] which supports several types of FoV, including translucence properties. The shadowcasting implementation is shorter and easier to read than most other implementations.
+
* [[SquidLib]] is a [[Java]] library made by [[Eben Howard]] which supports several types of FoV, including translucence properties. The shadowcasting implementation is shorter and easier to read than most other implementations.
 
* [[libfov]] is a [[C]] library made by [[Blue Puyo]], which supports both circular FoV and Beams using [[Shadow casting]]
 
* [[libfov]] is a [[C]] library made by [[Blue Puyo]], which supports both circular FoV and Beams using [[Shadow casting]]
 
* [[permissive-fov]] is a library for both C and C++ written by [[duerig|Jonathon Duerig]]. It uses [[Permissive Field of View]], and supports arbitrary shaping of FoV using visitation masks. It does not support Beams.
 
* [[permissive-fov]] is a library for both C and C++ written by [[duerig|Jonathon Duerig]]. It uses [[Permissive Field of View]], and supports arbitrary shaping of FoV using visitation masks. It does not support Beams.

Revision as of 02:01, 6 August 2013

Some of the most important features on roguelikes, including the presentation of the area that surrounds the player character, require to check the visibility of an object from a given point on the map. For example, it may be necessary to know which parts of map are visible from the place the player character is standing to draw those parts of map on the screen.

There are basically two ways to achieve this; by using Line of Sight to check all the map squares in range, which is a slow method as it repeats most of the calculations multiple times, or by calculating the Field of Vision as a whole.

Contents

Approaches

Some of the most common approaches to field of vision are:

Refinements

There are other refinements that can be applied to any approach:

Studies

Available Libraries

  • SquidLib is a Java library made by Eben Howard which supports several types of FoV, including translucence properties. The shadowcasting implementation is shorter and easier to read than most other implementations.
  • libfov is a C library made by Blue Puyo, which supports both circular FoV and Beams using Shadow casting
  • permissive-fov is a library for both C and C++ written by Jonathon Duerig. It uses Permissive Field of View, and supports arbitrary shaping of FoV using visitation masks. It does not support Beams.
  • libtcod is a C/C++/python library which, while not dedicated to fov, contains implementations of basic raycasting, los_rays (a.k.a. diamond raycasting), recursive shadowcasting, restrictive precise angle shadowcasting and precise permissive fov.
  • rlforj - Java library featuring several FoV algorithms.

See Also

Personal tools