Sunday, 4 January 2015

Fog of War

Getting a bit ahead of myself today but wanted to try out a few graphical ideas. A lot of adventure and Roguelike games use some sort of fog of war, that is, you can only see what your character would be able to see, rather than the whole game map.

Simple fog-of-war implementation
At first I was against this idea. Playing Lords of Chaos back in the 80s, I found the feature claustrophobic and restricting. Over the years, it has become more appealing as game makers have learned to better implement the idea.

There are a few ways you can apply fog of war to a game; here, I've used by far the simplest method by overlaying a static vignette on the whole screen. This is not particularly realistic and I don't believe adds very much to the game.

Later on, I'll be getting into line-of-sight code and ways of shadowing off areas not visible to the player. Some games have scenery in three stages: unseen, seen, and currently being seen. I like that model and will likely implement it myself, again, later on. There are more fundamental things to wrestle with before then.