This generator creates a shadow image overlay for your map. It currently supports a top-down camera view or y-axis perspective view, floor and wall shading, and full-tile opacity. The image is static, and should be generated outside the normal play of the game. Keep in mind that large light maps will considerably increase the size of your resource file.


The included demo is all set up to generate maps. Just compile with the example map you want to generate, and click the "Generate" verb.
The system can be easily integrated into other games, so feel free to use the light maps in your projects. In fact, if you decide to use it, I'd love to hear from you! Of course, I would appreciate a link or short mention on your hub.
If you have any questions, comments, or find any bugs, feel free to post on my blog comments or the hub's comments.
Update History:
- Version 2.3 (5/30/11) - EXE support, new method!
- Transfered from GDI+ to libpng
- Updgraded to filter-strip method
- Now uses an EXE with a progress bar
- Added shading of southward-facing walls
- Support for rectangular icon_sizes
- Added perspective-skew feature
- Added number of generator options, including light falloff
- Number of optimizations
- Fixed blank icon bug
- Fixed "eclipse" bug
- 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
- Version 2.1 (3/28/11) - Minor Update
- Updated DLL's version information
- Better error-handling
- Version 2 (3/27/11) - Soft Shadows
- Soft-shadow support added
- Version 1 (7/05/10) - DLL Support
- Transfered drawing over to an external DLL, greatly increasing the speed and ease of use of the generator.
- Light maps are now saved directly into DMI files, instead of savefiles.
- Arbitrary world icon-sizes now supported
- Version 0 (8/21/09) - Original Release
- Original release of Static Lighting Generator (1). Doesn't use a DLL, and generates hard-edge shadows. However, includes full generator source code.
proc name: generate (/lightGenerator/proc/generate)
usr: Kulex (/mob)
src: /lightGenerator (/lightGenerator)
call stack:
/lightGenerator (/lightGenerator): generate("lightMap_a.dmi", the wall (1,1,1) (/turf/wall), the wall (22,70,1) (/turf/wall))
Kulex (/client): Generate()
runtime error: bad icon operation
proc name: New (/icon/New)
usr: Kulex (/mob)
src: /icon (/icon)
call stack:
/icon (/icon): New(lightMap_a.dmi, null, null, null, null)
Kulex (/client): Load(lightMap_a.dmi)
Kulex (/client): Generate()
runtime error: bad icon
verb name: Load (/client/verb/Load)
usr: Kulex (/mob)
src: Kulex (/client)
call stack:
Kulex (/client): Load(lightMap_a.dmi)
Kulex (/client): Generate()
That bug appears, when I tried to generate light on demo map.