im trying to make a real time strategy game such as starcraft or age of empires. my maps woud have to support up to about 1500 entities. My problem arrises with how to implement a fog of war without lagging the game. The method that i initialy tried was to simply caclulate the distance to all surrounding area of a unit everytime it moved but as i expected this lagged since many units would be constantly moving. If anyone knows a faster algorythim for a fog of war please help. the maps would be tile based and stored in an array.