LambdaHack-0.5.0.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Server.Fov

Contents

Description

Field Of View scanning with a variety of algorithms. See https://github.com/LambdaHack/LambdaHack/wiki/Fov-and-los for discussion.

Synopsis

Documentation

dungeonPerception :: FovMode -> State -> StateServer -> Pers Source #

Calculate the perception of the whole dungeon.

fidLidPerception :: FovMode -> PersLit -> FactionId -> LevelId -> Level -> Perception Source #

Calculate faction's perception of a level based on the lit tiles cache.

type PersLit = EnumMap LevelId (EnumMap FactionId [(Actor, FovCache3)], Array Bool, Array Bool) Source #

The cache of FOV information for a level, such as sight, smell and light radiuses for each actor and bitmaps of clear and lit positions.

litInDungeon :: FovMode -> State -> StateServer -> PersLit Source #

Compute all lit positions in the dungeon.

Internal operations

newtype PerceptionReachable Source #

Visually reachable positions (light passes through them to the actor). The list may contain (many) repetitions.

Constructors

PerceptionReachable 

Fields

newtype PerceptionDynamicLit Source #

All positions lit by dynamic lights on a level. Shared by all factions. The list may contain (many) repetitions.

Constructors

PerceptionDynamicLit 

Fields