Field of view

Example:

map_number = rlfl.create_map(width, height)
rlfl.fov(map_number, (10, 10), 6, rlfl.FOV_SHADOW)

Algorithms available

rlfl.PROJECT_CIRCULAR

Circular ray casting.

rlfl.FOV_DIAMOND

Diamond raycasting.

rlfl.FOV_SHADOW

Recursive shadowcasting.

rlfl.FOV_DIGITAL

Digital FOV algorithm. Rather slow.

rlfl.FOV_RESTRICTIVE

Restrictive Precise Angle Shadowcasting (MRPAS).

rlfl.FOV_PERMISSIVE

Permissive raycasting.

FOV

rlfl.fov(map_number, origin, radius[, algorithm, light_walls])

Computes a field of vision on the map, marking all cells in the fov with (rlfl.CELL_SEEN | rlfl.CELL_MEMO).

All cells NOT marked rlfl.CELL_OPEN are considered to block LOS

Table Of Contents

Previous topic

Line Of Sight

Next topic

Projection functions

This Page