Fog of war explain (Gameplay and Algo) news - MachiaVillain...
Of course, the radius of this circle will be equal to the visibility range of your monster. And then we throw a ray from the monster, targeting each cell of the circle. For this work we use another 2D algorithm