Hello! I played the demo and have a few questions:
1) Is it possible to detect "brightness" at a specific room position? For example, to determine if a point or instance is hidden in shadow?
2) In the Light Collision demo, instances can be hidden when untouched by light. Would it be possible to only trigger this with specific lights, or modify the threshold that triggers visibility?
3) Rather then simple being visible / hidden, can instances instead only be partially lit / obscured by lights? Similarly to how games like Darkwood handle it. For a more advanced example, having only the pixels touched by a specific light object be drawn for a given instance.
4) Can you set some instances to be completely unaffected by certain lights?
Viewing post in Crystal - 2D Lighting Engine comments
1 - Yes, this is done with the .GetLightsCollisionAt() function. It returns the pixel color at the specified position, and with that, you can use color_get_value() to obtain the brightness of the color and thus create gameplay mechanics.
2 - Lights are objects, so you can do this without relying on Crystal; Crystal only provides the function of detecting the color of the light at that position.
3 - Yes, but you would have to create a shader that darkens the object's sprite according to the light's position. Since the lighting system is 2D, and the sprites are simple quads with two ultra-thin triangles, that's why there's such a drastic change when altering the light's depth.
4 - Yes, see: How to have any layer or graphic unlit (without being affected by lights)