Advanced Fog Of War?

  • This is repost from my post from about week ago and nobody answered.

    I have currently project to make a moba with C2. I started with fog of war, and I don't know how to make satisfying vision with my current knowledge.

    Basically I want "realistic fog of war" where units cannot see behind objects, and vision stacks from multiple sources. Vision shows objects with "team" variable same as oberserver's and hides others.

    I can achieve simple fog of war with black spheres in layer with "destination in" blending, but you can still see behind walls. I tried to use shadowligth, but multiple lights make glitchy shadows.

    I think tile-based map is best for this, but it would be strange as heroes etc. would still move around with 360 degrees 8direction, plus map would be one huge constantly updating lagfest.

  • Actually, fog of war is strictly a visual artifact/effect for the player.

    Use the Line Of Sight behavior for your units, and be sure to add the walls as obstacles.

    Out of their range, they won't "see"/perceive.

    And the fog of war has to cover/be drawn out of their range of perception.

    Spheres seems relatively OK for fog of war "border" details, otherwise it is overall a big dark rectangle.

    Consider using those spheres with appropriate blending modes like "destination out" to use them as display masks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yea, we use the destination out blending as in the "Lighting Demo" in C2 > New for our visual fog of war.

    All of the perception is handled server-side in our case.

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