How to achieve this flat 2D lighting effect?

Hi. I’m working on a 2D game and really want to implement this effect.

The player emits some kind of flat lighting I can’t figure out how to implement. Can anyone help with this?

Hey @SkelleRoznik ,
possibly I would imagine, there is a 2D pointlight with no falloff on the player character so it is lit evenly.
The background could be on another layer with global lighting so the color is visible.

And for those shadows, there should be a shadow caster script for your sprites or something like that, that you should be able to free form to your liking so it makes shadows.

Good luck! Hope it helped.

Watch this CodingTrain video on 2d Raycasting and you should be set. If implementing such a thing is too complicated for you, you have to look for an asset that does this for you.

Please keep in mind that a tutorial generally is not mean as a “step-by-step recipe” that gives you the exact same thing. Tutorials are there to transmit the idea behind something based on a concrete example. Many people seem to just “follow” a tutorial like it’s a recipe for how to bake a certain cake. If you want to become a game developer you have to actually learn how the things work. If something is too complicated for you, don’t worry you can still use premade assets. However in the long run it will limit your capabilities. So if you want to learn how to pull such a thing off, you really need to understand the concept behind it and translate it over to Unity. If you’re not willing to learn it or it’s way too complicated for you (which is often just a barrier in your mind and falls back to the first reason) then just search for assets which others have created and shared. You learn almost nothing by doing a manual 1-to-1 copy from a tutorial if you’re not understanding the concept.

if it’s not dynamic you can just color it like that, otherwise you will have to use or make a 2d light asset probably.