A Lighting Question

Okay so I was working on my current game and I want to replace the current lighting system with a huge sprite that covers the screen, but in the center slowly fades into a transparent circle. And the center follows the character. The lighting system is currently a bunch of blocks that slowly fade in and out depending on how close the player is, but it proves too many bugs, laggy, and it looks really choppy. I tried using lighting examples, but none have been proved successful or at least not for me.

If anyone has an image or sprite that would work perfectly for this then that would work perfectly thanks. If you made the image yourself then i’ll give credit.


Try using a similar system to the smooth camera system, and have it lock onto the player. Then make sure that the sprite itself is bigger than what the screen shows, which can be achieved by placing pure black (or whatever colour the darkness is in your game) blocks around the perimetre. This will keep the light locked on the player while reducing lag, looking great, and more.

1 Like