- Version 2.2 (3/31/11) - Bug Fixes and More!
- Fixed faint "tile outlines" in shadows
- Shadows are now properly symmetrical
- Large radii values are now supported (just keep it on the map, and outside walls!)
- Fixed duplication of last light
- Added comments and cleaned up demo code
- Added "Penumbra.dmm" example map to showcase the effects of different light source radii values
Most of these bugs were due to really, really dumb mistakes. Most of them arose when I decided it would be easier (and it was) to work with my data if it was all in the same units (ie just tiles, instead of pixels and tiles mixed).
Anyway, long story short, I accidentally left in a subtraction of 1/(icon_size*2) from a key component of the line equation, which was throwing everything just a tiny bit off and hurdling my line walking into an infinite loop.
Of course, there was also a flaw in how I was converting everything from pixels to tiles, which resulted in a slight jump in perceived values from tile to tile (creating a "tiling" effect hidden in my tests by my accursed fancy tiled flooring!)
These fixes did have the bonus side-effect of making the shadows properly symmetrical, which is nice to finally have working right.
Anyway, I'm just glad it's all working now and I won't have to look at it for a while. Life lesson. Now maybe I can finally find time to actually use the sucker. You should use it too if you're making a small top-down game ;)
(also, I've got a fan! :3 )