I began simply with a light source on the players position and light occluders on the wall tiles of the tileset as well as setting the tilesets canvas item material’s light mode to light only so only areas the light touch are visible and achieved this effect:
this functions correctly except now all wall tiles are hidden by the occluders. I have tried many things and cant seem to figure anything out so have just put another tileset with just the walls over the top to get this:
At the time I found a few lengthy issues and/or proposals that went into detail about the lighting issues and other workarounds, but I did not save the links
You might be able to achieve the intended effect by setting the OccluderPolygon2D.cull_mode to ClockWise or CounterClockWise (depending on the polygons edge direction) of the wall occluder polygon.
i would imagine this would result in a very grid like look as the tiles would only either be fully visible or invisible, no partial shading. which would be fine for some games but not the look im going for in this case.
I have played around with the cull mode and found the following:
If you are using seperate occluders for different parts of the wall (each tile for example) then changing the cull mode causes some undesirable effects like seen in this image from the link you provided:
If the occluder is just one big shape that covers all of the walls, the cull mode does essentially nothing except allow the occluder itself to be shaded or not. Achieving the same effect as layering a seperate wall tilemap layer as seen in my 3rd image.
However I have found a solution I think is about as good as Ill be able to get in a 2d topdown game with my limited experience. If I make 2 occluder polygons, one for the inside of the wall and one for the outside of the wall, like:
The inner occluder is casting shadows like before but not shading itself whilst the outer occluder is casting shadows that can shade within the inner occluder.
or honestly i might be trying to over complicate it and having only the outer occluder will suffice: