A Fog of War, in few steps.

Post your own tutorials, guides and demos.

Post » Fri Apr 20, 2012 3:09 pm

Hi this is my very fisrt tutorial, I espect be useful.

The first step for your F.O.W. I'd created a new layer, in the top of other layers and under GUI layer if you have it. Just like image below

(SEE FOW_01.png) in gallery.

Set the layer properties like this, for FOW color change the filter color to your choice.

(SEE FOW_02.png) in gallery.

Then create a Canvas Object and make it the size of layout of map, and setup its properties like this. Don't forget to clear canvas.

(SEE FOW_03.png) in gallery.

Afterwards, will create an Sprite object for FOW eraser just like that. The Shape of eraser is of your choice, i set it as circle.

(SEE FOW_04.png) in gallery.

Finally for test our FOW, i use MouseKeyboard Object to move and paste the FOWeraser into the Canvas FOW. The combination of Eraser Effect of Canvas with no trasnparency of FOW Layer will create the FOW FX, letting us to see the layer under FOW layer.

(SEE FOW_05.png) in gallery.

I doing it every 1000 to have a little delay in FOW FX.

FOW Turorial Gallery
.cap file

I espect this be usegul for anyone. Thanks! coming soon more Tutorials.
Yaottabyte2012-04-20 17:04:30
B
4
S
1
G
1
Posts: 69
Reputation: 863

Post » Fri Apr 27, 2012 5:06 pm

I'd noticed an VRAM issue for big maps, my case layout about 5000x5000 pxl i'm using a canvas of internal image about 512*512 pxl, then resized in the editor to the size of layout, the VRAM usage is about 112 MB that is too much for me, i'm working to improve the FOW implementation, coming soon i'll publish a new method.

Thanks!
B
4
S
1
G
1
Posts: 69
Reputation: 863

Post » Sat Apr 28, 2012 7:34 pm

Are you aware of the effect "Color Fusion (Masked)"? It can help tremendously with creating a fog of war.

Will post an example soon.

EDIT: Here is an example.tulamide2012-04-28 19:55:18
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests