2D Nuclear Throne style lighting [LibGDX]

Hello,

When it comes to graphic FX or shaders I am pretty clueless, I wanted to experiment with non Box2DLight lighting, something simple like this:

I found this code which seems pretty straight forward but it looks very inefficient, while it ran fine on my Windows PC which is a high spec it ran at around 30 FPS on my MacBook Air:

How might I achieve this, I am using LibGDX, making a game for PC (Windows/Mac)

Playing about with Box2D shaders and other settings, could probably stick with this solution:

it’s far simpler what they do (notice how it doesn’t cast any shadows).

it’s really blending alpha-transparent images on top of the rendered scene.

much like what I did with some of my games, and explained here (example uses libgdx, but it’s really a few simple opengl blend+render calls):
http://techblog.orangepixel.net/2015/07/shine-a-light-on-it/

to get that “rough” look they have, make your alpha-blended images very rough like this:

http://techblog.orangepixel.net/wp-content/uploads/2017/07/lights.png

Thanks very much will have a play with that tonight as I think I prefer that look to box 2D Lights.

Thanks for the tutorial, has given me more options with lighthing!

I made some changes to get it working, needs some refactoring but this is a great start, added a bit of shake to the example here while playing with ideas: https://gist.github.com/tyler6699/58a00ba6e679990984f8b090558ac3b4

good to see the tutorial helped :slight_smile:

some results I have with it in my games:

http://techblog.orangepixel.net/wp-content/uploads/2017/05/ashworld_decor02.png

http://techblog.orangepixel.net/wp-content/uploads/2016/05/Schermafbeelding-2016-05-11-om-11.59.49.png

http://techblog.orangepixel.net/wp-content/uploads/2015/08/sg_screenshot_640.png

test some things with the right ARGB values of a light, the size, and often I use a smaller light that’s brigther in the center, and then a bigger light a little less bright around it for great effects

Enjoy seeing all of your projects, some great screen shots there! I have followed the Robotability team and see they have some similar lighting which works so well. I will spend some time experimenting with this method and post some screen shots soon, really appreciate the help thanks for taking the time :smiley:

yeah the robotality guys actually told me how they did it, so I came up with this code which is basically the same :slight_smile:

If there is any running example for lights… in my game are actually pretty bad :frowning:

I will put a working example on Github later over the weekend.