Well, I'm looking at some tutorials and forum posts and I know that this question arise from time to time. But I really want to give Construct a chance and even young Godot got this covered with little effort. I want to make a flashlight for a top-down shooter.
It requires:
- To cast shadows (duh)
- To have a nice cone shape (bitmapped preferably)
- Occlude stuff that shouldn't be seen in the night (may be with the help of a line of sight behaviour)
- Show scenery when ambient light is starting to gain strength, keeping the cone masked by the shadow caster
And as simple as this sounds, it is hard to do it with just the shadow caster. I found a way tough that requires two layers, one for the shadows and one for the flashlight (with destination atop blending, also Destination in works).
Check it out: https://goo.gl/bK32yp
Question is: could you improve it? It would be nice if I could control the opacity of the "Flashlights" layer so when is morning you could se more than just the flashlight cone. Regards