Hello Scirra community, I am quite new Construct 2 and I was wondering how I can easily make realistic flashlight effect ?
I have been looking through forums and best I could find was having large image to follow you or to have image what subtracts opacity from dark image.
So I came along with my own temporary solution :
<img src="http://s21.postimg.org/rqv51ax4n/Untitled.png" border="0" />
Basically all map is covered with black cubes and if player have line of sight to then, they have full opacity on them, so as all squares in radius of 75 pixels from player are visible too.
Of course this may have been better with small cubes, but it seems they glitch out a little when copying (size are same, but they dont fit).
So faster to the point - is there easier way to do this ?
To have flashlight effect what do not work through solids ?
How to make it ?
Alternative - is there way to set several lines of sight ?
For example at 75 degrees it is 0 opacity, from 75 to 90 it is 50% and from 90 to 120 it is 75% opacity and so on.. or this can be done in different way to achieve same goal ?
Thanks ,
Mr1H
Update:
The same method but with smaller cubes, problem this is really demanding for the machine and gives huge fps drop :(
s24.postimg.org/5cxrkutat/Untitled.png
It looks quite nice, I think it may be even more effective having enemies as obstacles for FOV too.
I am sorry about default sprites, but I rather test game that way.