This is simple and open Java library. Main aim is to implement light math for tile maps.
- Static lights.
- Dynamic lights.
int w = 25;
int h = 25;
map = new LightMap(w, h);
map.addStaticLight(new Light(3), 5, 5);
map.addStaticLight(new Light(4), 9, 5);
map.addStaticLight(new Light(6), 16, 8);
map.addStaticLight(new Light(5), 6, 15);
map.addStaticLight(new Light(2, 5), 20, 18);
map.addStaticLight(Light.lightCircle(3), 5, 20);
map.addStaticLight(Light.lightSquare(3), 13, 20);
playerPos.set(10, 10);
dynamicLightId = map.addDynamicLight(new Light(3), new Position(playerPos));