1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. While the majority of active discourse on D20PRO has moved to our Discord Channels, this forum is still active and checked-in on regularly by our staff. However, for the very latest information, conversation and/or immediate support, please join us on Discord here: http://discord.gg/Ph38ckM
    Dismiss Notice

Fog of War performance and 3.6.10

Discussion in 'User Created Content' started by owlbear, Oct 1, 2016.

  1. owlbear

    owlbear Administrator
    Staff Member

    Joined:
    Sep 5, 2011
    Messages:
    636
    Likes Received:
    160
    So one of the undersung features of the newest release for D20PRO is the utilization of java's OpenGL renderer for 2D support.

    This is a huge advantage as Java is not an ideal graphics platform on it's own. However, by pushing the rendering tasks to OpenGL we're able to gain hardware acceleration as well as a better pipeline for handling things like Alpha-blending.

    How does this thing work anyway?
    In our tests leading up to the launch of 3.6.10, we were running maps with over 30 lights and 4+ connected players over the internet (within the continental United States) and seeing no more than a 1 second delay in player refresh after a move.
    1. Player drags token with light source.
    2. Player drops token in new location.
    3. <1 second network round trip.
    4. All Players are actively synced up and seeing the same things.
    Without OpenGL and the same configuration, we were seeing significantly higher refresh times for player movement.

    The root cause of this delay is likely deeper than just Alpha blending and graphics processing. It is likely in our network stack in that the GM/Host is authoritative. This means that when a player moves or performs an action, the GM is always the deciding factor in when that action completes on the Player's side.

    There is still room to grow in the performance arena, however, I think you'll find that the OpenGL renderer is a great deal faster than the previous D2D (Direct2D) renderer and it is also less prone to the visual bugs we were seeing occasionally crop up.

    Can I make it faster still?
    If you want to trim your sails further and speed things up even more, you can open the Game Tools panel (with a map open; Ctrl+T) and select the "Hide Fog of War" check box. This will switch fog of war from an overlay to an outline mode. In outline mode, there is no alpha blending being used for the Fog of War Regions. Lights still offer alpha blending and gradients so can be costly, however, the performance jump is substantial!

    Scotty, we need more power!
    This isn't the end of the work to be done to optimize and improve the fog of war engine. Some of the other tasks on our plate are as follows:
    • Introduce proper light fall-off
    • Calculate and manage light blending for public lights
    • Introduce a selected character lighting highlight
    • Add cones, squares and other light "shapes"
     

Share This Page