Download

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. :slight_smile:

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.
463443dba46f8482ce59f14090d447efc2df3a2d.png8a9c75e113095b5e0e94343d346cd28c45fd8090.pngmap2.png

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:
icons.png

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)

fog.png

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.

bg.png

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.

The user guide is now available: Download User Guide (PDF)](http://www.zkshao.com/downloads/JournMinimapUserGuide.pdf)

Update 1 is released::

  • Nav mesh can be included in generated background via the MapBackground setting bRenderNavigationMesh
  • As an alternative to SetViewExtent, zoom level can be controlled as a scale via the MapViewComponent functions SetZoomLevel()/GetZoomLevel()
  • Fixed a warning about precompiled headers

Features being worked on:

  • Multi-level backgrounds
  • Easier on/off toggling of backgrounds

It’s dope :slight_smile:

This looks amazing. Do you have any idea on a price point or is that still up in the air?

Thanks! The price will be $69.99.

I’m happy to share that this plugin has been accepted into the Marketplace! I will post the release date here as soon as this is decided.

I have a question for anyone who might be interested in buying this. With which engine version will you be using this?

Unfortunately while making final changes the plugin became incompatible with versions 4.13 and 4.14. I’m considering now whether to put time into redoing those changes in 4.13 to make the final version compatible. Was anyone hoping to use this in a 4.13 project? If so, I will make it compatible, but do let me know. :slight_smile:

I have received a release date from the Marketplace team.

Journeyman’s Minimap will release on the Marketplace on April 12th

Thanks to everyone who has been patient! If you have any remaining questions let me know.

Journeyman’s Minimap is now available on the Unreal Marketplace!

8ea27663c813c32604eebf7f405b19c5da9a3f9e.png](https://www.unrealengine.com/marketplace/journeyman-s-minimap)

Check out the user guide too: Download user guide (PDF)](http://www.zkshao.com/downloads/JournMinimapUserGuide.pdf)

Congratulations on the release :slight_smile: Might be worth editing the thread title as it still says 4.13+ :slight_smile:

Thanks and thanks, the title is updated now. :smiley:

Will this work with levels that are created dynamically at runtime?

Yes, there are a few ways you can go about this.

1) Placing icons to represent the level’s shape
For example, if you dynamically create a level by placing set pieces, every piece can have an icon that shows its shape. There is a setting on icons to define the icon’s size in world space, so if your set piece is 300 x 300, your would set your icon’s size to 300 in world space. It doesn’t matter then how far the minimap is zoomed in or out: the set piece’s size will always appear correctly relative to the background and other pieces.

2) Generating a background texture
You can use a dynamically generated texture as background texture for an area. In this case, you would:

  • Determine a bounding box of the generated level
  • Render the level geometry’s shape to a render target that represents the bounding box
  • Place a Map Background actor, included in the plugin, and set its box component position and size to the bounding box
  • Set the render target as the Map Background’s background texture

You should be familiar with drawing manually to render targets to try the second approach.

Interesting project!

I have a question though. Is it possible to generate a background texture based on a Nav Mesh? i.e. turn on the navmesh in the editor with P so that it becomes green. Does this green show up in the rendered background image? (so you can easily change the color in photoshop of the parts where you can walk, and perhaps add a border around it)

The nav mesh isn’t captured and unfortunately I wouldn’t know a fast way to do it. if you use terrain what you could do is temporarily replace the terrain’s material with a solid green material and make the snapshot. A feature that is included to help you generate a good image to draw over is the ability to hide actor classes and specific level actors in the generated background texture.

Generating a texture of the nav mesh is an interesting idea. I’ll think about this some more and experiment with whether this is possible!

Looks amazing!

Is it possible to set up multi-level maps? (i.e. a cave with many floors?)

I’m watching the Marketplace like everyday and I missed the release oO

It’s looking amazing!

Can’t wait to try it out :slight_smile:

That would be Awesome!

Looks really impressive, nice work.

Regards the nav mesh question above, yeah it would be a really nice feature. I’d suggest NavMeshRenderingComponent.cpp would be the place to start looking if you wanted to implement this.

If you could extend the system to overlay multiple masked/translucent layers of background that could be toggled on and off individually, that would open up some really nice possibilities. Don’t want to suggest this is lacking as it is though - it’s clearly been a lot of work and looks very well designed. Hope it’s successful.

Thanks for the kind words you guys!

There is a way to do this with the current version, but I will make this easier to do in an upcoming update. Currently, you can place multiple MapBackground actors that cover the same area and manually show/hide their background textures by temporarily clearing their background rendering material. This is not intuitive though, so I will improve this.

Firstly, I will be adding the following features to the MapBackground actor:

  • A property ZOrder to control the order in which background are rendered back to front and a corresponding function SetBackgroundZOrder(int) to change this during gameplay.
  • A function SetBackgroundVisible(bool) as a more intuitive function to control visibility. Internally, the UMG widget that renders the background texture would hide.
  • A function SetBackgroundOpacity(float) to enable you to fade background textures in and out. An opacity of <= 0.0 would be detected and again hide the UMG widget, to not waste effort on drawing an invisible image.

Secondly, I will be adding a way to define layers on a single MapBackground actor (i.e. for the same volume). This will function like LODs, but based on Z-tresholds and the Z-coordinate of the minimap’s observer (the MapViewComponent’s Z).

That is a great pointer, thanks!

How performance expensive is this? Does it render the scene twice?