About unnamed1334

Entries

 
Ludum Dare 37
 
Ludum Dare 35
 
Ludum Dare 34
 
Ludum Dare 33
 
Ludum Dare 31
 
Ludum Dare 30

unnamed1334's Trophies

unnamed1334's Archive

Fog of War Script with Example

Posted by
Tuesday, March 22nd, 2016 1:07 pm

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.

View post on imgur.com

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.

 

 

[cache: storing page]