Unreal Engine 5.8 · C++ Plugin · Blueprint-First

Build Your Own Location-Based Game

Hitz GeoMap streams the real world into your level around the player's GPS position: roads, buildings, water and parks as real geometry, with your own meshes and actors placed on top. Windows and Android.

0Game Modes to Inherit
100%Blueprint Accessible
5Provider Presets
13Built-In Map Layers
Overview

A Real Place, Built at Runtime

One map actor, one player pawn, one spawner. Open the sample level, press Play, and you are walking on real streets.

Westminster and the Thames built as 3D map geometry with trees, road posts and markers
Westminster, London, streamed live. Trees, road posts and markers are the included example rules.
What's Inside

Every System a Map Game Needs

Streaming Map

Tiles load ahead of the player and unload behind. Choose the detail level and how many tiles stay loaded, and change both while the game runs.

AHGM_MapActor

Layers & Styling

Thirteen layers, each with its own visibility, colour and material. Changes apply instantly. Save a look as an asset and reuse it.

FHGM_LayerSettings · UHGM_MapStyle

Mesh Placement

Rules put your meshes on map features: scattered through forests at a density per hectare, or spaced along roads.

FHGM_LayerRule

Actor Spawner

Your actors around the player or on real places, the same for every player with no server. Spacing, hand-placed spawns and stable IDs for saving.

UHGM_ActorSpawnerComponent

GPS & Compass

Own Android location code: permission prompt, status events, jitter filter, pause in the background. Simulated position in the editor.

UHGM_LocationComponent

Camera & Touch

Orbit, top-down and free-browse camera with drag, pinch and tap. A map camera that stays flicker-free on phones.

UHGM_MapCameraRig · UHGM_MapInputComponent

Interaction

Implement one interface on any actor and the player can use it when within reach, measured in real metres.

IHGM_Interactable

Anchor Modes

Let the player walk across a fixed map, or keep the player centred while the map slides. Pin any actor to a coordinate.

UHGM_GeoAnchorComponent

UI Events Hub

No built-in HUD and nothing in Project Settings. Bind your own widgets to one subsystem.

UHGM_MapEvents
Map Data

Five Provider Presets Included

The plugin contains no map data, no keys and no provider's code. It was written from scratch and reads the open vector tile format, so you choose who supplies the map.

OpenStreetMap

No key

For prototyping. Donated servers, no guarantee.

VersaTiles

No key

Free public server. Same look as OpenStreetMap.

MapTiler

Your key

Free tier, then billed to your account.

Stadia Maps

Your key

Free for non-commercial use, paid plans for games.

Mapbox

Your token

Billed by Mapbox to your account.

Any other server works through Custom, including one you host yourself. With a keyed provider, the usage, the billing and the provider's terms are between you and them.

In Action

See It Running

Documentation

Setup Guide

Requirements

ItemRequirement
EngineUnreal Engine 5.8
PlatformsWindows (editor and packaged) and Android. iOS and macOS are not supported.
ConnectionInternet access at runtime. Tiles are downloaded as the player moves and cached on the device.
Map dataA provider of vector tiles. Two presets need no account.
C++Not required. Every feature is available in Blueprint.

Installation

  1. Install the plugin from Fab to the engine, or copy the HitzGeoMap folder into your project's Plugins folder.
  2. Open Edit > Plugins, search for Hitz GeoMap, tick it and restart the editor.
  3. In the Content Browser settings turn on Show Plugin Content to see the sample level and materials.

Your First Map

  1. Open Maps/HGM_Sample in the plugin's content and press Play. Walk with W A S D, drag to orbit, scroll to zoom.
  2. For your own level, drag an HGM Map Actor into it and set Origin to a latitude and longitude.
  3. Drag in an HGM Map Player Pawn. It possesses itself, so no game mode is needed.
  4. Press Play. On a phone the map moves to the player's real position at the first GPS fix.

To see the map without pressing Play, select the map actor and click Preview In Editor. Clear Preview removes it.

Map Settings

Everything is on the map actor. Edits in the Details panel apply while the game is running, and each setting has a Blueprint function.

SettingDefaultWhat it controls
Detail Zoom16Detail level, 1 to 20. Each step up halves the ground one tile covers. 16 is street level, about 500 m per tile. Small streets and all buildings exist from 14 up.
Tile Radius2Tiles kept loaded each way from the player. 1 is a 3×3 grid, 2 is 5×5, 4 is 9×9. The grid is always odd because the player's tile is in the middle.
Units Per Meter100World scale. 100 is true scale; 10 gives a tabletop miniature. Everything the map draws or places scales with it.
Anchor ModeWorld FixedWorld Fixed: the player walks across the map. Keep Centered: the player stays put and the map slides underneath.
Follow TargetnoneStream the map around any actor of yours instead of the player.
Source PresetOpenStreetMapWhich provider supplies the map.
Show AttributiononShows the provider's credit line in the bottom-right corner.

More tiles means more downloading and more memory. On a phone a Tile Radius of 2 or 3 is a sensible range.

Providers & Keys

Pick the provider with Source Preset. For a keyed provider, enter your key under Project Settings > Plugins > Hitz GeoMap > Default Access Token, or in Access Token on the map actor.

PresetKeyCredit shown
OpenStreetMapNone© OpenStreetMap contributors
VersaTilesNone© OpenStreetMap contributors
MapTilerMapTiler API key© MapTiler © OpenStreetMap contributors
Stadia MapsStadia API key© Stadia Maps © OpenMapTiles © OpenStreetMap
Mapbox Streets v8Mapbox public token© Mapbox © OpenStreetMap
Do not ship a commercial game on a no-key preset alone. Those servers are free, come with no guarantee, and can limit or withdraw access. Use them to build and test, then switch to a provider with a commercial plan or host the tiles yourself.
  • Use a public key only. A key can be read from a packaged game.
  • The provider's credit must stay on screen. If you turn Show Attribution off, show it in your own UI.
  • Mapbox also asks for its logo and linked credits on screen. The plugin shows the text; the logo and links are yours to add.

Any other server

Set Source Preset to Custom and fill in Custom Source: the address with {z}, {x}, {y} and optionally {token}, the credit line, and the zoom range. Then set Custom Layer Names to the layout the server follows.

Custom Layer NamesUsed by
ShortbreadOpenStreetMap's server, VersaTiles, Geofabrik
OpenMapTilesMapTiler, Stadia Maps, most self-hosted servers
Mapbox Streets v8Mapbox
OtherAnything else. Build the map with Custom Rules.

Styling Layers

The Map Layers list holds the 13 built-in layers: Highways, Main Roads, Streets, Paths, Rail, Waterways, Water, Forest, Parks, Farmland, Sand, Built-Up Land and Buildings.

FieldWhat it does
VisibleShow or hide the layer. Instant.
ColorTint. Instant.
MaterialYour own material. Give it a vector parameter named Color to keep tinting.
Width MetersRoads and other lines: width.
Outline Width MetersRoads and other lines: a darker edge underneath, as on a printed road map.
Height ScaleBuildings: multiplies every height.

At runtime use Set Layer Visible, Set Layer Color and Set Ground Color. Press Save Style As Asset to write the current look to an asset you can assign to other maps.

Placing Meshes

A Custom Rule on the map actor turns the features of one provider layer into geometry or placed objects.

  1. Set Source Layer to the provider's layer name. Click Log Available Layers during Play to print every name.
  2. Set Mode to Instanced Meshes and pick your Static Mesh.
  3. For areas such as forests, turn on Scatter Inside and set Density Per Hectare. For lines such as roads, set Spacing Meters.
  4. Size it with Placement Scale and Random Scale Range. Sizes follow the world scale.

Add Example Rules gives you working trees, road posts and point-of-interest markers to copy from. Other modes draw flat areas, raised shapes or strips, or spawn an actor class on each feature.

Spawning Actors

Add an HGM Actor Spawner and list your actor classes in Entries.

SettingWhat it does
Source: Random GridPositions spread around the player. The same seed, place and time give the same spawns on every device.
Source: Map FeaturesOn real places. Type the provider's layer name in Feature Layer, for example pois or poi_label.
Radius MetersHow far from the player actors appear.
Cycle SecondsHow often the set of spawns changes.
Min Spacing MetersKeeps spawns apart.
Fixed SpawnsHand-placed spawns. Add more at runtime with Add Fixed Spawn, for content from your server.

Keeping a place collected

Every spawned actor has a Spawn Id that is the same on every device and in every session. When the player collects an actor, call Get Spawn Id, then Block Spawn Id, and save the Id. When the game loads, call Block Spawn Id for each saved Id.

Making an actor usable

Implement the HGM Interactable interface on it. The pawn's interaction component reports when it comes within reach and calls it when the player taps it. To pin any other actor to a coordinate, add an HGM Geo Anchor component.

Player & GPS

Use the supplied pawn, or add its components to your own. Each works without the others.

ComponentPurpose
HGM LocationGPS on a phone, simulated position in the editor. Reports speed, heading and distance walked.
HGM InteractionFinds usable actors within a radius in real metres.
HGM Map Camera RigFollow Orbit, Top Down and Free Browse camera.
HGM Map CameraThe camera to attach to the rig. Keeps distant roads from flickering on phones.
HGM Map InputDrag to orbit, pinch or wheel to zoom, tap to use, W A S D to walk the simulated player.

Bind On Status Changed on the location component to tell the player what is happening:

StatusMeaning
Permission NeededThe player has not allowed location for the app.
Location OffLocation is switched off on the device.
Waiting For FixListening, no position yet. Indoors this can take a while.
TrackingPositions are arriving.
SimulatedEditor or desktop: positions come from the simulation.

HUD & UI

From any Widget Blueprint, get the HGM Map Events subsystem and bind what you need.

EventFires when
On Player StatsA few times a second, with position, speed, heading and distance walked.
On Interactable Range ChangedSomething usable came into or went out of reach.
On Interact ResultThe player tried to use something.
On Attribution ChangedThe provider's credit line changed.
On Map ErrorA tile download failed.

For buttons, call the functions on the pawn's HGM Map Input component: Recenter Camera, Cycle Camera Mode, Zoom Camera, Set Virtual Stick Input, Interact With Nearest.

The map actor has its own events for streaming: On Map Ready, On Focus Tile Changed, On Tile Loaded and On Tile Unloaded.

Android

  • The plugin adds the location permissions to your app and asks the player the first time location starts.
  • It reads GPS, network location and the compass directly from Android. Do not enable the engine's Location Services plugins.
  • Location stops while the app is in the background and resumes when it returns.
  • A stationary phone's GPS wanders by a metre or two. The plugin ignores that, so the player stays still and no false distance is counted.
  • In Project Settings > Android, turn on Package game data inside .apk unless you distribute through Google Play with expansion files.

Troubleshooting

SymptomCause and fix
Only flat ground, no roadsThe provider's layer names do not match. With Custom, set Custom Layer Names; run Log Available Layers to see what the server sends.
Nothing loads at allNo connection, or the key is missing. Bind On Map Error: 401 and 403 mean a key problem, 429 means the quota was exceeded.
Player stays at the sample location on a phoneNo GPS position yet. Check Get Status on the location component: permission, location switched off, or still waiting.
Roads flicker in the distance on a phoneThe camera is a standard one. Use HGM Map Camera on the rig.
"No Google Play Store Key" at launchThe game's data file is not on the device. Turn on Package game data inside .apk.
No buildings or small streetsDetail Zoom is below 14, where providers leave them out.
Spawned actors come back after being collectedThey return each cycle by design. Call Block Spawn Id to keep a place empty.
Get the Plugin

Available on Fab

Hitz GeoMap is distributed as a code plugin with full C++ source. The listing link will be added here at release.