Is "fog of war" possible?

0 favourites
  • 3 posts
  • I want to have a good "fog of war" effect in my topdown game and wondering if it is possible in Construct.

    It will be a maze game where you are exploring a maze and have to find the keys to get to the exit.

  • I believe you could either create a giant grid of black spots that you set the opacity as needed (0 for current area and like 50 when not close).

    Or, from my understanding, it may be possible to do it more cleanly and dynamically using the canvas rather than individual objects.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Aasmund, is the Fog of War in my project like the one you're going for?

    I use Rojohound's Canvas plugin to save memory. Basically, set a "Darkness" layer that's black and non-transparent over the main layer. Put the canvas on that layer, then just generate "lightwindow" sprites (these are just black circles with the blend mode set to DestinationOut) where needed, then paste them to canvas and destroy.

    I think I've explained that right (going from memory here!) but that's the gist of it.

    EDIT - sorry, I think it's the canvas that needs to be set to Destinationout - the lightwindows can just be ordinary black circles (I use the paintbrush tool in C2 set to 0 hardness to get a nice gradient radiating out from the centre)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)