I was trying to add dynamic lighting to a brwosergame MMO my employer is developing. The game has animated character-sprites moving from cell to cell in an isometric perspective. So wanted to simulate light-propagation, shadowing and LOS on square grids.
I started with a Raycasting approach but that didn't look too good. Zones that should be half lit looked "jagged" and there were noticable changes in the scene's lighting whenever an agent would pass the boundaries between cells. Extensive research for an existing algorithm that would support sub-cell positions and partially occluded cells didn't yield any results.
So I thought that maybe other gamedevelopers in a similar situation would be interested to hear how I solved the problem. I've written an extensive
blog post including an
interactive demo with the full source available. Check it out!
I know it's not the first topic about
2d shadow effects but I hope it's novel enough to warrant it's own topic.