Isometric smooth fog
Posted
by
marcg11
on Game Development
See other posts from Game Development
or by marcg11
Published on 2012-12-15T15:15:41Z
Indexed on
2012/12/15
17:18 UTC
Read the original article
Hit count: 276
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/
© Game Development or respective owner