I'm creating a 2D, sidescrolling pixelart game and I am trying to create a basic lighting system.
The system should work within this heirarchy:
Darkness which can leave some foreground props unlit and left in the dark
Foreground props to be unlit
Light which will illuminate everything below it (The player, props, background)
The player and props to be lit
Ambient light which is just baked into the background
Im currently doing this by creating 6 layers:
propOverlay (Props are put here and set to have a Tint effect to give the illusion of being unlit)
activeLight (This layer contains an active light sprite set to a low opacity filled with the coloured lighting for the scene)
player (this layer is tinted the same as propOverlay is)
ambientDarkness (this layer contains a sprite holding the information where the dark areas in the scene are)
ambientLight (this layer contains a sprite holding the information for the background lighting which should not affect the player)
background (this layer just contains the background)
The problem with my solution is the tint given to the player sprite makes him look unnaturally lit and darker in the light areas of the scene.
I don't want to set up a large complex dynamic lighting solution for what will ultimately only be used for a few scenes in my game, but thats all I can find when I search for lighting systems. If you think I'm gonna have to set up a more complex lighting system for this then I'd love to hear some solutions and get links to some guides/resources.
Anyway heres my project file:
https://drive.google.com/file/d/1Prd6E9JjEs0KtdBZU4kVAu8d0v3IN2NS/view?usp=sharing