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


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:

  1. 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" })
  2. Travel time passes — the game time tracker advances by the configured travel duration
  3. Travel events — the AI can narrate events during travel (random encounters, scenery, dialogue). The creator can set up lorebook entries tagged for travel routes.
  4. 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:

+------------------------------------------------------+
|  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:

  1. Base map — the full map background image (always visible)
  2. Region overlays — each region's image positioned at its (x, y, width, height). Overlapping regions create depth (a castle on top of a mountain)
  3. Current location indicator — a glowing highlight or marker on the current region
  4. Adjacent region indicators — subtle highlight on reachable regions
  5. Travel paths — lines or arrows between adjacent regions (optional, can be part of the base image)
  6. 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:

Undiscovered regions render as:

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:


Creator Setup Flow

  1. Create a gallery for map assets (base map + region overlays)
  2. Upload the base map — the full world/area image
  3. Upload region images — individual overlays for each explorable region
  4. 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
  5. Create a location tracker of type keyword with the visual map visualization
  6. Set the starting region and configure extraction hints for the evaluation LLM
  7. 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:

Out of scope (future):