Difference between revisions of "Field of Vision"

From RogueBasin
Jump to navigation Jump to search
m (Added AS3 implementation of "Modeling Rays for LOS in an Object-Rich World")
Line 14: Line 14:
* [[Digital field of view]] (new and unheard of)
* [[Digital field of view]] (new and unheard of)
* [http://www.geocities.com/temerra/los_rays.html Modeling Rays for LOS in an Object-Rich World]
* [http://www.geocities.com/temerra/los_rays.html Modeling Rays for LOS in an Object-Rich World]
* [http://www.visualharmonics.co.uk/actionscript-3/as3-conversion-of-modelling-rays-for-line-of-sight-in-an-object-rich-world/ Modeling Rays for LOS in an Object-Rich World - ActionScript 3 interactive example]


== Refinements ==
== Refinements ==

Revision as of 22:28, 26 January 2009

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.

Approaches

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

Refinements

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

Available Libraries