u/s0llyin r/programming • Recommends
On “My Attempt at a Shadow Casting Algorithm”
I got the idea of attempting Shadow Casting in a game through this excellent video: [video
I've however approached things slightly differently - using straight line calculations rather than raycasting, and "edge" elimination techniques - and am quite happy with the results (although I need to combined edges, still). There are very few instances of artefacts cropping up but I'm planning on ironing those out. Otherwise, I aim to more generally apply the algorithm to all objects in the game space that "emit" light, as their light sources still leak through walls (i.e. aren't clipped via shadow casting).
Quite the difficult journey, but enjoying it!