Fog of War Script with Example
For anyone who wants to create a RTS game with some fog of war, I made a script that handles calculating and drawing fog of war.
It tracks seen area, unseen area, unexplored area, and height. The script does not have line of sight implemented but should work identically in most cases.
The script is not the most efficient and has some strange issues with pixels being automatically compressed but the script should give an example.
You can download the source here:
https://drive.google.com/file/d/0Bz235BbxwbbnekhqYUZ1Tk1saHc/view?usp=sharing
You’re free to use or modify the script and use it however you want.
Comments
taviandir
22. Mar 2016 · 21:08 UTC
I’m planning on participating in the upcoming MiniLD#66 so this code was very interesting to look at, thank you! Good job! 
