2D lighting - don't let light through the wall

I have a collision map, and some places that I want to be sources of light. A light source provides light, which is actually a form where I can see the earth. Now it looks like this:

enter image description here

So, light passes through the walls. I want to do this:

enter image description here

(I noted collisions with the walls in dark yellow)

Thus, the light rays stop when they meet the wall. I want to get the shape of the right light, the best thing would be a bitmap containing it)

, , ( , ), 0,001 . , . , , , . , , , , .

, allegro 4.2.1, 2- 0 1.

Thanx , .

+5
3

, .

.

+7

, () . , . , .

+2

MadKeithV O ( ^ 2).

- MadKeithV, O ( ). O ( )

, . , BFS, "" , .

BFS , " ".

+2
source

All Articles