Re:How to create 2D visibility/shadow effects for your game
by TophWells on Wednesday March 12, 2014 @12:35PM
(#7386635)
That's not a hack, that's actually the best way to do it. And it can work with more complex shapes (even non-convex ones) as long as you can find the tangent points - which isn't always easy.
http://i.imgur.com/G5U43ZU.png
Calculate the edge points of the circle, draw a line between them, and then your shadow is simply a rectangle. Overlay the circle over the shadow to hide the line.
This will work with circles and ovals, but not more complex curves.