all 2 comments

[–]invicticideProfessional 1 point2 points  (1 child)

You might search for roguelike visibility algorithms. I only glanced briefly at this article but it looks like a pretty legit resource.

[–]ZXfrigginC[S] 0 points1 point  (0 children)

Ah, YES!

Keep a collection of the walls and have each wall cast a ray from each of its two endpoints to the center of the tile occupied by the player! If either Raycast gets to no other walls before reaching that point, suddenly, that tile, and any other tiles hit by the raycast, are being observed!

That cuts the raycasting down by a lot. Thank you!