I wanted to add some lighting effects to my game. The only way I know t achieve this is through a shader who calculates the lighting. But for multiple lightsources it's a bit complex at the moment. Is there an easier way to just create an overlay lighting effect?
You can simply darken the entire scene and add a kind of sprite lighting to the parts you want illuminated. For example this was used in the SNES Zelda and other games back in the day.
They would make the whole scene almost totally black in the caves for example and when you light a candle you get a bubble of light around you. Also torches on the wall would have the same sprite surrounding them.
Its not the best looking effect in the world but its sure easy and does add a nice little touch to 2d games.
Of course remember to add alpha channel for transparency of the light and this works best when the scene is very dark.
Im sure there are better solutions but this is one ive used in the past just to add a little touch to my games without using shaders / particle systems and other lighting effects
The answer to this related question on SO gives a simple solution to the problem. Use a texture like this (this one s CC0, use as you wish):
Then when you draw this sprite you blend it with the background:
batch.setBlendFunction(GL20.GL_DST_COLOR, GL20.GL_SRC_ALPHA); // Blend with background theLightSprite.draw(batch, parentAlpha); // Draw the circle of light batch.setBlendFunction(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA); // Normal rendering