In games like Command & Conquer or Age of Empires, players can't see all of the map. Terrain and enemies are revealed only when the player has soldiers nearby.
As I understand it, the most performant way of doing this is by representing map visibility as a grid of cells. When a unit moves into a new cell it updates all cells within a circle shape around the unit.
However, I would like to know how to integrate sight blocking. What I mean by this, is that if a cell is occupied by something which a unit can't see past (like a wall) all cells behind the wall are covered by fog-of-war.
Here's a YouTube video of what it should look like. The author doesn't go into how they did it, aside from mentioning "brute force shadow casting".