Made a game ages ago that uses a very simple technique for that effect
All you need to do is
Make a new layer call it 'FOG OF WAR' or whatnot
Place a new object sprite in that layer
That is an Alpha blended PNG Sprite Blackout mask
much like the followingFOG OF WAR OBJECT
I tend to favor a HEXAGONAL shape but you can use any shape you like (you can even put WEB GL effects on it if you like for extra cool stuff ) as long as it has a well blurred overlapping area and a solid black area of reasonable size.
in the editor adjust its size to what ever requirements you require.
then spend the time either duplicating it manually or use a spawning script to cover your layout at the start of the layout.
There are plenty of easy ways to do this...
The add a 'FADE'behavior to the sprite...and set it to
'Active at start NO'
Leave FADE IN AT ZERO
Then set your delay and fade OUT times to what ever suits you
and finally destroy on fadeout yes
Then make a new event ..
->> player (or whatever you want to remove the fog of war)
is overlapping the Fog of war object
->> and another condition ->>'For each' Fog of war object
->>Fog or war -fade out Start
and thats it
each blob of black should fade out when your player touches it and stay gone...
The only issue is layout out all of the objects either manually (takes a long time unless you make duplicates 'ctrl drag') or use the script to
populate your layer via a spawning code that will overlap each Fog or war object
Adjust the Fog of war spacing and fade timing is really all you have to perfect...
See this capx for a very simple demo
:)FOG OF WAR DEMO
Same system can be used for any game...platformers ..8 dir anything!!mystazsea2013-08-11 07:58:52
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)