how to implement "xor" for a canvas drawing
I am working on a 2d top-down project where a character has limited vision because the scene is dark. This character has a light that lets them see a certain radius around him. To create this effect, I was thinking of attaching two drawings (a rectangle to fill the screen and a circle over the player) to the character to create a xor that would become an "opaque fog-of war" or "candlelight" effect.
This option (xor) exists in microScript:
(Under "Documentation" -> "Quick Reference" -> "API Cheatsheet" -> "blending modes")
but I haven't worked with the "blending modes" options yet so don't know how to implement xor or the other blending into the code. How can this be done? If there is a better way of creating this effect, I'd love to hear that too.