[EXAMPLE] Using 'Color Fusion' for a fog of war

This forum is currently in read-only mode.
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • Here is an example that uses the effect "Color Fusion (Masked)" to create a fog of war. This example with a 4000x4000 layout in a 1024x576 window runs at over 1000 fps on my pc, when all 1600 sprites that reveal the fog are created.

    1) Create your layout

    2) Add a "fog of war" layer

    3) Apply "Color Fusion (Masked)" as a layer effect

    4) Use sprites created on the "fog of war"-layer as cutmasks to the fog

    You could further optimize this example by creating/deleting the cutmasks when they get in or out of sight. You can use different shapes or even animated shapes, use a smaller or wider grid size, etc. The advantage of this method is that you don't use any additional VRAM (the layer effect always renders to screen size). Also, the layout size isn't important (CC cares more about sprites on screen, than the total number of sprites). And since the revealing is made out of sprites, you can have a vivid fog, e.g. different stages of revealing, instead of just 100%.

    Download:

    fow.cap

  • Whaaaa, outstanding^^ Many ppl tried to make a good FoW effect, but this one seems to be the smoothest and niftiest(does that word exist oO?) way to do it, thank you <img src="smileys/smiley32.gif" border="0" align="middle" />

  • Thanks, zyblade!

    And I also think, this one is a smooth and at the same time quite easy (compared to other methods) way for a designer. In this example it uses only 3 events to achieve an already impressive FOW. Now what would it look like, if you'd use the total control you have over every aspect of the fog, to change shapes, coloring, opacity, set game action spots, animate the fog, etc., etc. ? <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Whaaaa, outstanding^^ Many ppl tried to make a good FoW effect, but this one seems to be the smoothest and niftiest(does that word exist oO?) way to do it, thank you <img src="smileys/smiley32.gif" border="0" align="middle" />

    I agree. It's totally amazing!

  • Is there anyway to have this work with Construct 2?

  • Is there anyway to have this work with Construct 2?No, it is a DirectX based pixel shader.

  • Maybe some analogue in Construct 2? In any form? No?

  • Can't find a way of duplicating this effect for Construct 2, maybe one more experience fellow will give us a hand? Need this effect for a tank battle game, but it keeps running away from me...

  • You can't duplicate it without being able to access the alpha channels of the textures. If it is possible with javascript (or whatever is the language) to hook into the rendering process, then paint everything black where no object is placed on a certain layer, but paint the background where those objects are. That's basically it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It can be done in C2 with a layer with "force own texture" and the "destination out" effect for the light glows.

    http://dl.dropbox.com/u/5426011/examples12/fow22.capx

    It's quite a bit slower than tulamide's CC version. The main reason is CC can handle a lot more objects before slowing down.

  • Hey, I'm trying to do this in Construct Classic, and I couldn't find the "Color Fusion (Masked)" layer effect. So I tried to open your cap and I got this error

    ---------------------------

    Error loading application

    ---------------------------

    Failed to load application: This file was saved in a newer version of Construct and cannot be loaded by this version. Please visit scirra.com to look for the latest update, or click 'Check for updates' on the ribbon bar.

    ---------------------------

    OK   

    ---------------------------

    What is this newer version of Construct Classic, and where can I find it?

  • 'Color Fusion (Masked)' is not bundled with CC. It is an effect I made and can be downloaded here

    The newest version of CC, r2, can be found here

    Enjoy the fog of war! <img src="smileys/smiley1.gif" border="0" align="middle">

  • Thanks!

    Hmmm.... now why does the website not link to construct classic r2 -.-

  • Check out my new shooter exmple for a fow effect that saves fps

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