Progressively reveal the map to the player
As the character walks around the map, progressively reveal the entities on the map to them, using an algorithm based on well known circle-rasterizing and line-rasterizing algorithms to calculate lines of sight that are potentially obscured by walls.
This commit is contained in:
parent
6678ac986c
commit
58fce2ec19
17 changed files with 454 additions and 52 deletions
|
|
@ -14,6 +14,9 @@ data Character = Character
|
|||
deriving anyclass (CoArbitrary, Function)
|
||||
deriving Draw via (DrawCharacter "@" Character)
|
||||
|
||||
instance Entity Character where
|
||||
blocksVision _ = False
|
||||
|
||||
instance Arbitrary Character where
|
||||
arbitrary = pure Character
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue