Hey there!
I want to implement a (not-so-dynamic) lightengine into my game.
But I don’t know how.
My Map is a simple int[][] and Tiles drawn are 16x16.
I somehow thought of a class LightEmitter, which produces light.
Every Tile has some kind of “Light Damping” which reduces the light by a certain value.
e.g. you have a light with an intensity of 16 and the tiles around it have a damping value of 2. This means the light doesn’t reach any other tiles after 8.
My Tilemap should also use a “shadow color”. Light-Value 0 is the shadow color so it doesn’t appear completely black without light.
Any Ideas How I can manipulate the appearance of the tiles? I want to implement 2 Methods:
“Hard” Lighting and Smooth Lighting