User Tag List

Results 1 to 8 of 8

Thread: fog of war

  1. #1
    d3athknight
    Guest

    fog of war

    how do you create fog of war?

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: fog of war

    By programming.

    What exactly are you having trouble with?

  3. #3
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: fog of war

    good answer :wink:

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperiOS Export ModuleMac Export ModuleSWF Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    JasonDarby's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    4,938
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: fog of war

    If someone knows they could explain the concept of how to do it, of course it would require programming, Im sure the OP already knows that, and these posts dont exactly help him solve the issue

  5. #5
    Clicker Fusion 2.5 Developer

    Join Date
    Jun 2006
    Location
    Hampshire, UK
    Posts
    963
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: fog of war

    Have an array, and make it say, 32 times smaller than the screen. Therefore each position in the array is worth one 32x32 tile on the screen.

    Now, if an array square is set to 0, it means there is fog, if you switch it to 1, that means the area is clear. Then run a loop to draw out the fog only for the area on screen (you don't need to draw out what isn't on the screen).

  6. #6
    No Products Registered

    Join Date
    Jan 2007
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: fog of war

    A really cheap way to do it is to have a invisible circle around your character that destroys the "fog" particles when they collide. Of course, it depends how you want to do your fog.

    To do Star-craft style fog, the above applies to the dark "unexplored" areas. For visible enemies/structures you can detection within a certain radius of your character to make enemies visible/invisible.

    JT

  7. #7
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: fog of war

    Quote Originally Posted by JasonDarby
    If someone knows they could explain the concept of how to do it, of course it would require programming, Im sure the OP already knows that, and these posts dont exactly help him solve the issue
    You just tore though my joke man... I'm just tired of posts that ask questions in an extremely vague way.

    Another way you could do the fog of war is using the overlay object. Simply clear it with color (0,0,1), then draw (0,0,0) circles around all the objects you want vision from. Just be sure you have the overlay set to transparent. (The overlay would have to be aligned to the screen at the beginning of every frame, but this eliminated the need for a massive overlay that covers the whole map).

    You could also have an 'explored but not visible' layer of the overlay, by having 2 separate objects, 1 like how it is described above, and another that draws circles based on a whole bunch of invisible objects that are created wherever a friendly unit walks.

  8. #8
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Apr 2008
    Location
    California
    Posts
    357
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: fog of war

    The quickest way I found was to use paint to create a black square with a faded circle in the middle. However, this won't cover for the places you found, just impairs the vision for the player. But, I've never heard of any other examples so this is a big help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •