Lighting via images not working?

I'm having an issue with making a circular light around my characters in a dark area. Though I'm not sure what I'm doing wrong.
1732124279056.png


1732124328608.png

1732124376715.png

The black image doesn't appear at all, meaning that I see the edges of the lighting image when the player moves toward the edges of the screen or the light is too small.
The way I understood it, the black background should be covering the entire screen and get replaced/overwritten by the light image wherever that one is, but the black background is just gone completely.
This doesn't look quite right to me. You wouldn't be wanting to redraw those pictures constantly every other frame - there's no need to be spending those computer resources.

If one image is taking up the whole screen, then doing Show Picture once already does that; then, if the other is supposed to be centered on the player if they're near walls, you'd still do Show Picture once and then Move Picture on it after that.

The way I understood it, the black background should be covering the entire screen and get replaced/overwritten by the light image wherever that one is
Where did you get that understanding?

1 - pictures are ordered by ID, so ID 2 displays on top of ID 1.

2 - There is no replacement or overwriting, they are layered. So there's no way you could use these two images to actually see the hole in the middle, regardless of whether it's on top or the bottom you'd see the black of the other image through it.

I don't see why you feel you need two images for this in the first place. Just make your image with the hole large enough that it covers the screen wherever the hole is positioned. Then you do Show Picture one time and use a parallel event to track the player and Move Picture to them.
To add: the second image doesn't show because Screen blending ignores black (i.e. rgb 0).
  • (R,G,B) screen (r,g,b) = (1,1,1) - ((1,1,1) - (R,G,B)) * ((1,1,1) - (r,g,b))

Original thread: https://forums.rpgmakerweb.com/threads/lighting-via-images-not-working.173351/