Fog of War (Sector Visibility)

Discussion in 'TemplePlus' started by DarkStorm, Sep 20, 2009.

Remove all ads!
  1. DarkStorm

    DarkStorm Established Member

    Joined:
    Oct 2, 2003
    Messages:
    514
    Likes Received:
    3
    Hello every,

    I am working on fog of war for my engine and right now I am trying to use the SVB files for that.

    I've made some progress on my own, but it doesn't match the original fog-of-war algorithm. Does anyone have a more detailed description on sector visibility?

    I am especially interested in how far a character can see and how the mechanics for the extend flag works... Is it true, that normal "blocking" tiles block visibility unless there's an extend tile behind them? But what about "patches" of blocking tiles? (there's a pile of rubble in the moathouse that is marked as blocking, but is revealed in the original game...

    Any information would be greatly appreciated :)

    Cu,
    Storm
     
  2. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    Not sure if this helps, but there are several different types of tiles in World Builder.

    1. There are blocking tiles that denote places you cant move through or see through (walls).
    2. There are tiles that you can not move through, but you can see over and shoot over (like a hole)
    3. There are tiles that you can not move through, but you can see over, shoot over, and provide cover (like a barrel).

    The rubbish would probably be considered similar to a barrel.
     
  3. DarkStorm

    DarkStorm Established Member

    Joined:
    Oct 2, 2003
    Messages:
    514
    Likes Received:
    3
    Yeah well I checked that but the rubbish is really declared as *blocking*, not flyover/cover. It's really counter-intuitive... Although at the end of the rubbish there's an extend tile. Maybe that triggers it... I don't know.

    Cu,
    Storm
     
  4. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,740
    Likes Received:
    374
    Visibility should extend through 'extend' tiles until you hit 'end' tiles.
     
  5. DarkStorm

    DarkStorm Established Member

    Joined:
    Oct 2, 2003
    Messages:
    514
    Likes Received:
    3
    Yes, that's also what I tried to implement. But let me give you an example screenshot:
    [​IMG]

    Color Description.
    Green Extend
    Red Block
    White Flyover/Cover and Archway
    Yellow Base
    Purple End

    The same screenshot from the original game, the moment you step into the moathouse:
    [​IMG]

    It seems I am more restrictive than the original game when it comes to visibility. Not to mention that I am not smoothing the fog texture as much as the original game is, but that's an improvement I can do later on.

    My current (new) theory is, that patches with the "blocking" flag set (no extend) will be revealed if they are entirely within the view radius. So the blocking tiles that are at the edge of the map will not be revealed, because they extend far beyond the visible radius.
    I'll check that out later today.

    Cu,
    Storm
     
Our Host!