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

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

    Now available on the marketplace: Marketplace Page
    User guide: User Guide (PDF)



    Hey everyone,

    I would like to present a minimap and fog of war code plugin that I have been working steadily on for some time. It just released on the Marketplace.

    Supported minimap types
    Minimaps come in many shapes and sizes, so let me first reassure you that most likely the minimap you have in mind is supported by this plugin. This plugin supports maps that are:
    • Rectangular or circular
    • Bordered or borderless
    • Transparent or opaque
    • Player centric or any area
    • Fixed or rotating
    • Small or large

    Here are a few examples of maps created with this plugin. If you choose to use a border, you can customize the border graphic. You can effortlessly use multiple maps at once, for example to toggle between a player-centric minimap and a 'full map' that shows the entire level.
    Click image for larger version

Name:	map1.png
Views:	1
Size:	94.6 KB
ID:	1212609Click image for larger version

Name:	map3.png
Views:	1
Size:	72.5 KB
ID:	1212610Click image for larger version

Name:	map2.png
Views:	1
Size:	117.5 KB
ID:	1212611

    Minimap icons
    Any actor can appear on the minimap by giving it a 'MapIconComponent'. Via that component, you can customize how that actor appears:
    • Set the texture and (animated) material
    • Set the draw color and Z-order
    • Icon can rotate along with its owning actor, or have a fixed angle
    • Icon can turn into an objective arrow when its off the minimap, the graphic is customizable
    • Set the icon's size in screen space, so that it always has the same size in pixels, no matter the zoom level
    • Alternatively, make the icon match a given size in world space. Use this to mark quest areas.
    • Three animations are included: flashing icon, pulse (or MOBA/RTS map ping) and clock animation
    • Actors can access their icon's material instance for gameplay driven icon animations
    • All properties can be changed during gameplay. Use this to apply team coloring and hide icons until they become relevant, or to trigger animations on gameplay events.
    • You can react to MapIconComponent events, such as when the icon is clicked on the minimap, mouse-overed or enters/leaves the minimap.

    Some examples of icons:
    Click image for larger version

Name:	icons.png
Views:	1
Size:	108.7 KB
ID:	1212608

    Fog of war
    Fog of war is actually its own subject, but if a game has fog of war it should certainly show up in the minimap. If you purchase a minimap that doesn't support fog of war out of the box, it is not easily added. But for those of you making a game that requires fog of war or explorable fog, this plugin has got you covered by providing a fully working fog of war system! It features the following:
    • Add fog to your level by adding a resizable 'MapFog' actor
    • Fog appears in the minimap, where the opacity of hidden/explored/revealing areas are tweakable
    • Fog can also appear in the world via a post processing effect, again the opacities are tweakable
    • Fog can be revealed temporarily for MOBA/RTS style team vision
    • Alternatively, fog can be revealed permanently for ARPG style exploration
    • Any actor can reveal fog by giving it a 'MapRevealComponent'
    • Team vision can be achieved by enabling the reveal component only for allies of the local player
    • A MapRevealComponent can reveal a circular area (for players) or a rectangular area (for example for door triggers that reveal a room)
    • The revealed area can have a drop off distance, so that the total revealed area has a soft edge
    • Icons can be visible in fog (quest markers, rare item drops) or hidden in fog (enemies)
    • Actors themselves can also be hidden in fog (enemies)

    Click image for larger version

Name:	fog.png
Views:	1
Size:	787.4 KB
ID:	1212606

    Background creation
    You most likely want to create your own background textures. The plugin comes with a helpful tool for that: the 'MapBackground' actor is a box shaped actor that you can resize and move to any position. It will then render an orthogonal top down snapshot of the area covered in the box. You can draw over the render in an external image editing program, then import that and assign it to the same MapBackground, which will make your drawn background appear on minimaps. You can place multiple such MapBackgrounds to make efficient use of texture space in case your level doesn't have a perfectly rectangular layout. All those backgrounds will appear in the minimap, but backgrounds that don't intersect the minimap's view aren't rendered.

    Click image for larger version

Name:	bg.png
Views:	1
Size:	706.6 KB
ID:	1212607

    Code plugin
    This would be the first minimap code plugin on the marketplace. As a code plugin, its up to you whether you access the plugin's features via code or blueprint. You can manage the minimap icons completely in C++ if this fits your current workflow. Blueprint developers rest assured that all features are exposed to blueprint too. Be aware that if you are working in a blueprint-only project, it must be converted to a code project. Epic has described the steps for that: Instructions

    This plugin has been released on the marketplace. This thread will now function as the support thread. If you have any questions or feature requests, please let me know.
    Last edited by Zhi Kang Shao; 05-09-2017, 03:47 PM. Reason: Some images not working

  • replied
    So i just got this from the summer flash sale and within an hour I LOVE IT.
    However, i have 3 things that i could some help understanding. It's more the render texture than the plug in itself.
    First, my level is dark.. like really dark. So to get the map to be visible, i have to turn the alpha on the texture render up a few pts. is there a better way?
    Second, the map is a little pixellated.
    Third, for now i'm using the bordered example; i may have missed it in the docs, can i resize the minimap as a whole?

    Otherwise, fantastic work, I've wanted your plugin for a while now and I'm so glad I got it.

    Leave a comment:


  • replied
    I am having a issue with the 4.22 version. My map reveal texture appears as a half circle with a very misshapen other half.
    I did not have this issue in 4.21.
    Attached Files

    Leave a comment:


  • replied
    Originally posted by Namesis View Post

    still waiting for a confirmation on this.. if this is already implemented in the asset or I'll need to tweek it.
    Basically if you have a fornite map and put this plugin and place two players on each map border they wont be able to see each other in the map or minimap, hence the question if there is a kind of persistant data to send the player coordinates and update the map
    Unfortunately there is no out of the box support for net updating icons even though the actors are net culled. A custom solution would be necessary for that. A simple approach would be to host the MapIconComponents on non-net culled actors, at the cost of replicating some actor locations double and the extra actors' memory footprint. There are more elegant solutions, but bottom line this isn't supported out of the box.

    Leave a comment:


  • replied
    Originally posted by Maydie View Post
    This plugin is so awesome. I started a RTS project (all blueprint based) then started to panic when I could not find any well implemented fog of war systems. This is that and more.

    Having said that, is there anyway I can do a trace or something similar on the mapfog to see if an area is currently visible (basically, I do not want players to build anything in undiscovered areas). Also, is there a way to exclude specific meshes so they always show 100% through the fog (i.e. on top of the fog).

    Any thoughts?

    Thanks!
    Hey Maydie,

    Way late response but in case you are still interested. The feature you desire is certainly supported! The fog of war is designed with retrieving values in mind. The function for that is the MapFog actor's "GetFogAtLocation". Because I figured that depending on your game rules, you also may want to differentiate between areas that are currently being revealed (for example you have a unit nearby) or have ever been revealed (a unit explored it in the past), the query also lets you control that.

    For a simple check (revealed or not) the function returns a boolean that represents whether the area has been revealed or not. For even more advanced control, since the explored area has a soft edge, you can retrieve the exact revealed factor (which could be for example 50% if its in the center of the soft edge).

    Leave a comment:


  • replied
    I got a small problem with the minimap...
    If the root component of my actor is scaled up the icon has a weird offset on the minimap.
    I am using UE 4.21.

    Leave a comment:


  • replied
    This plugin is so awesome. I started a RTS project (all blueprint based) then started to panic when I could not find any well implemented fog of war systems. This is that and more.

    Having said that, is there anyway I can do a trace or something similar on the mapfog to see if an area is currently visible (basically, I do not want players to build anything in undiscovered areas). Also, is there a way to exclude specific meshes so they always show 100% through the fog (i.e. on top of the fog).

    Any thoughts?

    Thanks!
    Last edited by Maydie; 03-09-2019, 07:40 PM. Reason: Bumped for response

    Leave a comment:


  • replied
    Originally posted by Namesis View Post

    Correct. And no, I dont have custom visibility mechanic, just modified net cull distance on actors (npc / player / items)
    If you (on the characters/npcs) decrease the net cull distance to 4000000.0 (since its a topdown game, for example) the actors on minimap will stop showing. So yeah, after this they just disappear, so I was wondering if there is a way to have a persistent data or something that will keep showing those actors (lets say a party member) even after not being network relevant to the client (out of net cull distance).

    if not.. maybe a future update with this? :P This can happen to anyone with a big map even with epic's default net cull distance, just saying.


    Regards!
    still waiting for a confirmation on this.. if this is already implemented in the asset or I'll need to tweek it.
    Basically if you have a fornite map and put this plugin and place two players on each map border they wont be able to see each other in the map or minimap, hence the question if there is a kind of persistant data to send the player coordinates and update the map

    Leave a comment:


  • replied
    Hello! We are using the journeyman's minimap. Great tool! I am working on the SAVE GAME and i am wondering if there is a way to save the current FOG OF WAR information without saving all the data from unreal. I am also using multiple mapfog for a better resolution.

    Thanks!

    Leave a comment:


  • replied
    Hello! We got some strange problem when upgrading to 4.21 version.

    It took us a while to find out the reason of the blurriness of our FPS hands (When moving mouse or character) until we found that it`s the fog of war...
    We then start to eliminate the possibilities and found that removing the fog combined material solve the problem
    But once we remove it we don`t have correct fog of war in our map...

    Could you please assist in this?

    Thanks,
    Doron

    Leave a comment:


  • replied
    Originally posted by SyedAman View Post
    Is there a way I can disable the fog for players/spectators? After a player loses I would like to disable fog of war for him.
    Yes, fog is calculated locally. Try executing this, on the client that should see everything:

    Code:
    AMapFog* FogInLevel = ...;
    UMapFunctionLibrary::GetMapTracker(this)->UnregisterMapFog(FogInLevel);
    If you're working in a blueprint only project, unfortunately UnregisterMapFog isn't an exposed function. For now, you can Destroy the MapFog actor for only the player that gets to see everything. Actor destruction is irreversible though, so the fog can't be turned on unless the player reloads the level (rejoins the server).

    Leave a comment:


  • replied
    Is there a way I can disable the fog for players/spectators? After a player loses I would like to disable fog of war for him.

    Leave a comment:


  • replied
    Hello! I got a problem with the journeyman's minimap.

    I got a night scene with low lighting. As a result the generated minimap/full map is very dark. Is there a way to add lighting to the generated world texture without having to add light in the scene? (so I can keep my nightly feeling in the scene)

    Kind regards,

    Stefan - Creative Director at Rebel Camp Games

    Leave a comment:


  • replied
    Hello,

    I really enjoy this plugin but currently we are having a strange behavior which is probably wrong configuration...
    When I`m adding a background image I set the size of image which 4096/4096 but the view is strange.
    I have Squares in the background which looks like rectangle.

    I have added an example picture for the original image and the in game.

    What am I doing wrong? I tried to follow the documentation but without success....
    Original image In game view

    Leave a comment:


  • replied
    Plans to update to 4.20?
    Thank you.

    Leave a comment:

Working...
X