LambdaHack-0.2.8: A roguelike game engine in early and active development

Safe HaskellNone

Game.LambdaHack.Server.Fov

Description

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

Synopsis

Documentation

dungeonPerception :: COps -> FovMode -> State -> PersSource

Calculate the perception of the whole dungeon.

levelPerception :: COps -> State -> FovMode -> FactionId -> LevelId -> Level -> PerceptionSource

Calculate perception of the level.

fullscanSource

Arguments

:: Ops TileKind

tile content, determines clear tiles

-> FovMode

scanning mode

-> Point

position of the spectator

-> Level

the map that is scanned

-> [Point] 

Perform a full scan for a given position. Returns the positions that are currently in the field of view. The Field of View algorithm to use, passed in the second argument, is set in the config file. The actor's own position is considred reachable by him.

data FovMode Source

Field Of View scanning mode.

Constructors

Shadow

restrictive shadow casting

Permissive

permissive FOV

Digital Int

digital FOV with the given radius

Blind

only feeling out adjacent tiles by touch