Block Light 2D

What is it?
Block Light 2D is a block-based multi-layered propagating light framework that penetrates the ground, using Unity's Tilemap system.

[Core features]
- Ambient lighting and placable lighting, all customizable in color and strength;
- A complete day night cycle system with customizable colors, speed, interval, span and dawn focus point;
- A highly optimized algorithm ensuring incredibly fast light updates that aren't directly bound to the number of active lights for every action. You can have hundreds of lights in view with only a fraction of the performance loss;
- A special performance control section that spreads asset script CPU execution over multiple frames, depending on a customizable max milliseconds slider. Game already performance heavy? Just set the limit to a few ms and you never have to worry about lag spikes from this asset. Guaranteed top performance on any machine or game with the right setting. Hooking up your own scripts to this system is also possible.

- A complete lighting user interface with settings like:
- - - - Toggle lighting on or off with the click of a button;
- - - - Toggle random light color for placed lights;
- - - - Light penetration adjustment for the front and back layer;
- - - - Back layer shading that controls the base shading factor for cave systems;
- - - - Day night cycle tweak options to fit any world.

The user interface also provides tools right out of the box like:
- - - - Placing blocks on any layer;
- - - - Removing blocks on any layer;
- - - - Placing lights throughout the world;
- - - - Removing lights;

- A guide explaining the asset in its entirety, including how to set it up in your game, F.A.Q. and more as well as fully documented code for each script.

Also included in this asset is Terrainify 2D, my free terrain generator combined with a robust chunk loading system. Check out its page for more information. Its guide is included in this asset as well.

Requirements
- At least Unity 2017.2 or later because of the integrated Tilemap system from Unity.
NOTE: Earlier versions than 2018.2.11 have not been tested as of now. 2019.1.x is compatible.

Future plans
- Utilize ECS, the C# Job system and the Burst compiler to optimize CPU times even more with multi-threading if possible;
- Multi-channel color blending with a single pass;
- [Finished] A day night cycle system;
- [Finished] Implement terrain generator and chunk loading
- [Finished] A thorough expansion of engine functions to make it easier to manipulate the asset;

Website | Contact me

Feel free to contact me not only if you found a bug or have questions, but if you have feedback or if there's a feature you'd like to see in this asset as well. I'll respond as fast as I can!