gavrilovmiroslav / svarog

A C#-only old-school modular game engine
0 stars 0 forks source link

Shadowcasting implementation #6

Closed gavrilovmiroslav closed 1 week ago

gavrilovmiroslav commented 1 week ago

https://www.albertford.com/shadowcasting/ https://www.roguebasin.com/index.php/Shadow_casting

gavrilovmiroslav commented 1 week ago

Interface: (BoolMap, (int, int)) -> BoolMap

The inputs are a bool map of the level (false = wall, true = passable), and a position where from the shadowcast is being done. The output is a bool map of the same size as the input one, where it's true if the field is visible, and false if it is not.

Isa1997 commented 1 week ago

Issue should be resolved with commit https://github.com/gavrilovmiroslav/svarog/commit/9d3c542802e6e6df449224bd23df78e674e3fef8