Visual Map — Design Document
Status: Concept — depends on Trackers for location state, Gallery & Image Storage for region images, and Tracker Visualizations for rendering infrastructure.
Overview
A visual map is an interactive, image-based navigation system for location-driven narratives. Creators build maps from overlapping region images — each region is a visual layer that can be hovered, clicked, and traveled to. Movement is constrained to adjacent regions with configurable travel time, creating a sense of geography and distance.
The map is event-driven: the AI doesn't just teleport the player — travel is a narrative event with duration, and things can happen along the way. Walking from the village to the forest takes 2 hours of game time. Crossing the mountain pass takes a full day. The map visualizes where the player is, where they can go, and how long it takes.
Core Goals
- Let creators build explorable worlds with layered region images
- Constrain movement to adjacent regions — no teleporting across the map
- Travel time as a game mechanic — distance matters, events can trigger in transit
- Integrate with the tracker system for location state and lorebook injection
- Keep the map purely visual and declarative — creators upload images and define connections, no scripting
How It Works
Map as a Tracker Visualization
The visual map is a specialized tracker visualization for a location tracker. The underlying tracker is a standard keyword tracker storing the current region slug. The map visualization renders this as an interactive image.
Tracker: "Current Location"
type: keyword
value: "shadowkeep_entrance"
visualization:
type: visual_map
mapId: "darklands-map"
When the location tracker value changes (via LLM evaluation), the map updates to show the new current region.
Map Definition
A map is a creator-defined asset consisting of:
| Field | Type | Description |
|---|---|---|
name |
string | Map name ("The Darklands", "Starship Deck 3") |
baseImageId |
gallery_image_id | Base/background image of the full map |
regions |
array | Region definitions (see below) |
defaultRegion |
string | Starting region slug |
Region Definition
Each region is an area on the map with its own visual layer:
| Field | Type | Description |
|---|---|---|
slug |
string | Unique identifier (shadowkeep_entrance, dark_forest) |
name |
string | Display name ("Shadowkeep Entrance", "The Dark Forest") |
imageId |
gallery_image_id | Region overlay image (positioned over the base map) |
position |
{ x, y, width, height } |
Position and size on the base map (percentage-based for responsive scaling) |
adjacentTo |
string[] | Slugs of regions the player can travel to from here |
travelTimes |
object | Travel duration to each adjacent region: { "dark_forest": "2 hours", "village": "30 minutes" } |
lorebookEntryId |
uuid (optional) | Linked lorebook entry for region description |
description |
string | Short description shown on hover |
discovered |
boolean (default: false) | Whether the region starts visible or is hidden until visited |
Adjacency Graph
Regions form a graph where edges represent possible travel routes. The adjacency is directional — a one-way passage from A to B doesn't imply B to A (a cliff you can jump down but not climb back up).
Village ←→ Crossroads ←→ Dark Forest
↕ ↕
Mountain Pass → Shadowkeep Entrance → Shadowkeep Interior
↓
Dungeon Level 1
↓
Dungeon Level 2
The player can only request travel to adjacent regions. The UI shows which destinations are reachable from the current location. Clicking a non-adjacent region does nothing (or shows "You can't reach there from here").
Travel Mechanics
Travel as an Event
Moving between regions is not instant. When the player (or AI) initiates travel:
- Travel starts — the location tracker updates to a transit state:
"traveling:dark_forest"(or a structured{ status: "traveling", from: "village", to: "dark_forest", remaining: "2 hours" }) - Travel time passes — the game time tracker advances by the configured travel duration
- Travel events — the AI can narrate events during travel (random encounters, scenery, dialogue). The creator can set up lorebook entries tagged for travel routes.
- Arrival — the location tracker updates to the destination region slug. The map visualization updates.
The travel time is a suggestion to the LLM, not a hard mechanic. The extraction hint on the location tracker tells the evaluation LLM: "When the player travels to a new region, set the value to traveling:destination_slug. After narrating the journey for the appropriate travel time, set it to the destination slug."
Interruptions
Travel can be interrupted. If the player encounters bandits halfway through a forest journey, the location might stay at traveling:dark_forest while the encounter plays out. The map shows the player "in transit" visually (pulsing dot on the path between regions).
UI Rendering
Map Panel
The map is accessible from:
- A dedicated map icon in the chat toolbar (when a visual map tracker exists)
- The expanded tracker detail view
- Optionally as a persistent side panel (creator-configured)
+------------------------------------------------------+
| THE DARKLANDS |
| |
| [Mountain Pass] |
| | |
| [Village]---[Crossroads]---[Dark Forest] |
| | | |
| [Shadowkeep ]---[Shadowkeep |
| [ Entrance ] [ Interior ] |
| | |
| [Dungeon L1] |
| | |
| [Dungeon L2] |
| |
| Current: Crossroads |
| Can travel to: Village (30m), Mountain Pass (4h), |
| Dark Forest (2h) |
+------------------------------------------------------+
In practice, this is not ASCII art — it's layered images:
Visual Layers
The map renders as stacked image layers:
- Base map — the full map background image (always visible)
- Region overlays — each region's image positioned at its
(x, y, width, height). Overlapping regions create depth (a castle on top of a mountain) - Current location indicator — a glowing highlight or marker on the current region
- Adjacent region indicators — subtle highlight on reachable regions
- Travel paths — lines or arrows between adjacent regions (optional, can be part of the base image)
- Fog of war — undiscovered regions are dimmed or hidden (if
discovered: false)
Interaction
| Action | Result |
|---|---|
| Hover region | Shows region name, description, and travel time from current location (if adjacent). Non-adjacent regions show "Not reachable from here." |
| Click adjacent region | Initiates travel — sends a message to the AI like "I travel to the Dark Forest." The AI narrates the journey. |
| Click current region | Shows region detail: full description, linked lorebook content, any notable items or NPCs present (from trackers). |
| Click non-adjacent region | Tooltip: "You can't reach [Region] from [Current Location]. Travel to [nearest adjacent region on path] first." |
| Click during travel | Disabled or shows "Currently traveling to [destination]..." |
Fog of War
Regions can be hidden until the player discovers them. A region is discovered when:
- The player arrives at it (location tracker set to its slug)
- The player arrives at an adjacent region (optionally — "you can see the forest from the crossroads")
- The creator explicitly reveals it (via a tracker or lorebook trigger)
Undiscovered regions render as:
- Hidden — not shown at all (the base map shows through)
- Silhouette — dark shape visible but no detail, no name on hover
- Fog — semi-transparent overlay obscuring the region image
The fog mode is creator-configured per map.
Map as a Shared Asset
Maps are defined at the character/mode level and stored as a structured JSON definition. The region images come from the creator's gallery. This means:
- Multiple characters can share the same map (by referencing the same gallery and region definitions via a package)
- A package can ship with a complete world map
- The map definition is portable — export a character and the map comes with it (image references resolve to the gallery)
Creator Setup Flow
- Create a gallery for map assets (base map + region overlays)
- Upload the base map — the full world/area image
- Upload region images — individual overlays for each explorable region
- Define regions — for each region:
- Name, slug, description
- Position on the base map (drag-and-drop editor or manual coordinates)
- Link to gallery image
- Adjacent regions and travel times
- Optional lorebook entry link
- Starting discovered state
- Create a location tracker of type
keywordwith the visual map visualization - Set the starting region and configure extraction hints for the evaluation LLM
- Optionally create lorebook entries for each region and travel route
Map Editor (Future)
A visual drag-and-drop map editor would be ideal but is out of scope for v1. Initially, creators define region positions using percentage-based coordinates and preview the result. A visual editor is a natural follow-up.
Dependencies
| Dependency | Status | What's Needed |
|---|---|---|
| Trackers | Phase 1 shipped (2026-05-30) — eval LLM, per-message snapshots and typed values (freeform / numeric / percentage / enum / list / datetime) are live; the type this needs is not | Location tracker with keyword type, structured transit states |
| Gallery | Shipped | Base map images, region overlay images |
| Tracker Visualizations | Concept | visual_map as a visualization type, rendering infrastructure |
| Lorebook | Shipped | Optional region descriptions, travel route entries |
| Packages | In progress (packages are live in Browse; see its status) | Package-level map definitions for portable worlds |
Scope Boundaries
In scope:
- Image-layered map rendering with region overlays
- Adjacency-constrained navigation (click to travel to adjacent regions only)
- Travel time as a game mechanic with transit states
- Fog of war (hidden/silhouette/fog modes)
- Hover and click interactions on regions
- Integration with location tracker and lorebook
- Percentage-based responsive positioning
Out of scope (future):
- Visual drag-and-drop map editor
- Animated travel (player dot moving along a path)
- Dynamic map changes (regions destroyed, new paths opened) — tracked manually via lorebook/tracker triggers for now
- Multiplayer maps (multiple players on the same map)
- Procedurally generated maps
- 3D or isometric rendering
- Minimap in chat (always showing a small version)
- Map zoom/pan (v1 shows the full map at a fixed scale that fits the panel)