Isometric smooth fog
- by marcg11
I'm working on a simple 2d game with direct3d 9. It's a isometric game with diamond tiles and a staggered map. This is what I have:
As you se I have some king of fog which is acomplished by having a fog matrix which is true (clear terrain) or false (obscure terran). But the result is very chunky. The fog moves as the player moves by tiles but not by pixels. Basically I check for every tile if there is fog, if so I just change the color of that tile:
if(scene->fog[i+mapx][j+mapy] == FOG_NONE) { tile_color = 0x666666FF; }
I also would like the fog to be smoother, for that I followed this "tutorial" but I haven't managed to work it it out.
http://www.appsizematters.com/2010/07/how-to-implement-a-fog-of-war-part-2-smooth/