LibGDX Player Overlay

Hello,

I’m looking for the best way to implement a player lighting overlay, similar to the one in this video:

I’ve been told I could use an image, but if it were to follow the player it wouldn’t work…

How can I do this appropriately?

You can use an image. Just create the center with full transparency and blend the image on top of the main scene. Make the image larger than the target resolution so you never see the edges.

@Slyth2727 , I just feel like this could have flaws in some way. It feels dirty. :-X

Name the flaws and I’ll try my best to provide solutions. There are other ways to do what you want, but this way is the cleanest and easiest imho.

The main flaw I have in mind @Slyth2727 is that the player may eventually see the edges of the image overlay. + with the orthographic camera at 15f/9f scale, I’m not sure how I would appropriately scale it.

Well you could do a couple things. One, make the image humongous. Don’t do this. Two, you could do some sort of tiling based on the position of the overlay texture. To do it this way you would draw the overlay, then have a 1x1 texture that’s the same color and opacity as the outlying colors of the overlay texture and draw that 1x1 with the width and height overlay texture, tiling them correctly programmatically. I’m sure there are a million better ways to do this, but it’s 3:30 am here and I need to go to bed. Alas, I have yet to finish a project that’s due tomorrow. Anyways, I hope someone else can give you a better method.