Skelitten Games

Minimap System

The plugin comes with a modular minimap system. Its features include:

  • A tool that can automatically convert navigation data into minimap meshes. There are several post-processing options for these auto-generated meshes, including flattening the mesh, snapping vertices to a grid, and simplifying the mesh.
  • Support for 2D and 3D minimaps.
  • An icon system, making it easy to add static and moving markers to the minimap.

The minimap system consists of the following components:

  • Minimap Mesh, one for each module.
  • Dungeon Minimap Geometry, one for each dungeon. The spawner creates it to hold all minimap meshes of that dungeon.
  • Dungeon Minimap Manager Component, one for each local player. Captures the minimap geometry, creates the minimap widget, and manages minimap icons.
  • Dungeon Minimap Widget displays the minimap and its icons.
  • Dungeon Minimap Icon Component marks an actor on the minimap.

The minimap system will be enabled if you set up the minimap manager component for a player and load a dungeon where at least one module has a minimap mesh.

Setup

To be able to generate minimap meshes, you first need to:

  • Open Project Settings → Search for Supported Agents → Add a new agent named "Minimap".

This nav agent is only used to generate the minimap. It is not needed for any gameplay purposes.

Minimap Generation Settings

The minimap generation settings can be found in Project Settings → Plugins → Dungeon Generator Evolved → Minimap Generation.

  • Minimap Material sets the material that is applied to generated minimap meshes by default. This material needs to have Used with Instanced Static Meshes enabled.
  • Navigation Bounds Fill Percentage affects the size of bounds created by the Dungeon Tools' Create Nav Bounds button. A value of 50% means that the lower half of all module bounds will be filled with nav bounds. Set this up so your Nav Mesh only generates on the floor (and not on the ceiling for example). If you have navigateable surfaces higher up in your modules, you need to increase this value.
  • Agent Radius controls how close the mesh gets to walls. A larger radius leaves a wider gap.
  • Cell Size and Cell Height set the width and height of the cells Unreal uses to build the navmesh. Smaller cells capture more detail and take longer to build.
  • Max Simplification Error controls how much Unreal can simplify the outline.
  • Min Region Area removes small, disconnected patches.

I recommend trying out different values for each setting (with post-processing disabled) to get an idea of how they affect the Nav Mesh generation. Which settings deliver the best results depends on your level geometry.

Post-Processing

  • Flatten Minimap Mesh makes the generated mesh 2D. Keep this enabled unless you want to use a 3D minimap.
  • Snap to Grid aligns points to a grid (based on the module origin). Grid Size sets the spacing.
  • Boundary Angles let the outline follow any angle or limits it to 90° or 45° steps.
Properly tweaking the minimap generation and post-processing settings can lead to significantly better results.

Tools

  • Regenerate All Minimap Meshes rebuilds the minimap meshes for all registered modules, including modules that don't have a minimap mesh yet. If Generate Navigation Bounds First is enabled, the tool creates or updates the generated navigation bounds for each module before rebuilding the minimap mesh.

Creating Minimap Meshes

For each module, you need to:

  1. Open the module level and create its module bounds if you haven't already. See Creating Module Bounds for more information.
  2. In Dungeon Tools, click Create Nav Bounds. This creates one Nav Mesh Bounds Volume per module bounds piece.
  3. Click Create Minimap Mesh.
  4. Check the generated mesh in the Minimap folder (placed in the same folder that your level is in). If you want to change the result, adjust the generation settings and regenerate the minimap mesh.
  5. Click Save/Update module data to save the mesh reference on the Module Definition.

If you already set up the navigation bounds for your module manually, you can skip steps 1 and 2. Make sure that your navigation bounds support the Minimap agent. Try to avoid having your navigation bounds extend beyond the module bounds, as could otherwise affect other modules in a generated dungeon.

You can also use the Regenerate all Minimap Meshes tool to automatically perform steps 2–5 on every registered module.

Setting Up the Minimap Manager

If you haven't set up a Game State yet, see Setting Up the Game Mode and Game State.

On your Game State:

  1. Add a Dungeon Minimap Manager Component.
  2. On Begin Play, call Initialize Minimap and pass the Player Controller of the player that owns this minimap.

Make sure to check out the minimap manager component's settings in the Details panel.

The minimap manager's settings allow you to define how the minimap is captured (resolution, angle, zoom, ...).

Adding Minimap Icons

Add a Dungeon Minimap Icon Component to an actor and assign its image (for 2D minimaps) or its mesh (for 3D minimaps). A minimap icon will now be placed at the actor's location.

Using the Minimap for Non-Dungeon Geometry

If you have non-dungeon levels, you can still use the same minimap system there.

Call Set Level Minimap Geometry on the Minimap Manager Component and provide your own Minimap Geometry actor. Any geometry added to this actor will show up on the minimap. You probably want to enable Visible In Scene Capture Only on this geometry.

Search documentation

Type to search all documentation.