I want to use 2D lighting that can be blocked by in-game objects. My game is block-based and has a view from the top of the flat world. Now lets say I have a 10x10 world and I place a light at 1x1 and walls around that light. I want to be able to see the light source at 1x1 but anywhere else to have no light source.
I've hear casting light rays works but what algorithm do I use?