Announcement

Collapse
No announcement yet.

Journeyman's Minimap - Code Plugin for Minimaps and Fog of War

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Hi,

    I'm looking for a way to extend the fog of war beyond the defined bounds so it covers the whole map, and not just the bounded area. Right now I have my island covered, but the user can move the camera to a point where the fog stops, and the opacity suddenly changes.

    The simple solution would be to increase the bounds of the fog to cover a larger area, but the area I'm covering is already very large, and the bigger the bounds are, the more jagged the edges become (I'm also trying to keep the fog render size small, currently 512x512). As such, I'd just like to do it in the Post Process instead.

    Any thoughts on how this could be done easily?

    Comment


      Hi Zhi Kang Shao ,
      maybe you remember, we worked on Our Ghosts of War for a short period, when I decided to use your plugin for my own RTS project...
      I finally added it and have the following experiences:


      1) The Minimap

      - It works great, no performance drop at all, really game ready out of the box!

      - For increased C++ usage, I had to comment out "protected:" at MapIconComponent.h at line 250, because I need to keep bHideOwnerInsideFog = false for my buildings, but need to set it true for my group of units. Imo better not to restrict access of properties by protected/private too much...


      2) The FoW

      I had a couple of serious performance issues, because I have approx 500 moving units in my game and a few hundred buildings too, so first I was really in panic...
      Luckily, I was able to normalize it

      - The 1st is really game specific, just a hint for other users : I do not use MapRevealerComponent for my units, instead one component per group of units. (I have a unit group/formation system)

      - I added this line to MapFog.cpp constructor, helps a lot, but results in a sawtooth GPU load:
      PrimaryActorTick.TickInterval = 0.25f;

      - In MapFog.h I increased this value, less responsive, but also results in a huge performance increase (it is also "protected", no idea why):
      float FogCacheLifetime = 0.5f;

      - Maybe it would be more handy to follow UE4 coding conventions, namely the default values in UE4 are normally set in the cpp file in the constructor, for me at least....

      - In the MinimapExample project, in FogDemo map, please ungroup the actors, it is impossible to access the component settings otherwise... Imo important for less experienced users.


      And a question:
      Would it be possible somehow to use more render targets, to spread the update over more frames, to increase update smoothness?

      A few screenshots from my test-bed project, with and without FoW, check StatUnitGraph for the sawtooth shape in case of FoW:





      As a summary, it is a really great plugin. codes are clear, made well, that worths the money, even if I bought it when was discounted

      Best regards,
      Ivan
      Edge of Chaos RTS
      "Age of Total Heroes" - RTS Pathfinding and Movement System for UE4
      RTS Camera C++ Tutorial

      Comment

      Working...
      X