DesignGddMap UI

Map UI

Status: Designed Author: user + game-designer Last Updated: 2026-03-28 System Index: #16 — Vertical Slice, Presentation Layer

Overview

The Map UI renders the branching node map, showing all nodes with their types, connections, the party's current position, and available paths. The host can click a connected node to select the next destination. Non-host players see the map and the host's selection but cannot interact. The map is fully visible from the start — players can plan routes by seeing all node types ahead.

Player Fantasy

"We can see the road ahead and choose our fate." The map creates strategic discussion: "Should we go through the elite for a better reward, or take the safe path with a rest stop?" Seeing the whole map enables forward planning and team debate.

Detailed Design

Screen Layout

┌─────────────────────────────────────────────────────────┐
│  Party HP: ♥45  ♥52  ♥30  ♥60        Rally: 0          │
├─────────────────────────────────────────────────────────┤
│                                                         │
│  Layer 0:        [⚔]  ← current (highlighted)          │
│                  / \                                     │
│  Layer 1:     [⚔]  [⚔]  ← available (glowing)         │
│                |  \  |                                   │
│  Layer 2:    [★]  [♥]      ★=elite ♥=rest              │
│               |   | \                                    │
│  Layer 3:   [⚔] [⚔] [⚔]                               │
│              | \  | /                                    │
│  Layer 4:   [♥] [⚔]                                    │
│              |   |                                       │
│  Layer 5:   [★] [⚔]                                    │
│               \ |                                       │
│  Layer 6:    [⚔]                                        │
│               |                                          │
│  Layer 7:    [☠]  ← boss (skull icon)                   │
│                                                         │
└─────────────────────────────────────────────────────────┘

Node Icons

Node TypeIconColor
COMBATCrossed swordsGrey
ELITEStar / skull with crownGold
RESTHeart / campfireGreen
BOSSLarge skullRed

Node States

StateVisual
VisitedDimmed, checkmark overlay
CurrentBright highlight, pulsing border
Available (connected to current)Glowing, interactive (host only)
Future (not yet reachable)Normal opacity, non-interactive

Interaction

  • Host: Click an available (glowing) node to select it. Confirmation not needed — click = go.
  • Non-host: View only. Cursor shows "not allowed" on nodes. Text: "Waiting for host to choose…"
  • Hover (any player): Shows node tooltip — type name, encounter preview for combat nodes ("2 Goblins" or just "Combat Encounter").

Connections

  • Lines drawn between connected nodes using Line2D or custom draw.
  • Available path lines are brighter/thicker than other connections.
  • Visited path has a distinct color (e.g., dotted trail).

States and Transitions

MAP_VISIBLE → host clicks available node → selection sent to server → scene transition

Interactions with Other Systems

SystemDirectionInterface
Map SystemReadsMapLayout (nodes, edges, types, visited status)
Game State ManagerReadsCurrent node index from RunData
Player ResourcesReadsParty HP displayed in header
Networking LayerSendsHost sends select_node RPC

Formulas

Node Positioning

x = (node_index_in_layer / (nodes_in_layer + 1)) * screen_width
y = (layer / layer_count) * map_height + top_margin

# Jitter for visual variety:
x += seeded_random(-30, 30)

Edge Cases

CaseResolution
Single node in a layer (no choice)Still show the node. Host clicks it. Could auto-advance with a brief pause.
Map doesn't fit on screen (many nodes)V1: fixed 8 layers, 1-3 per layer = always fits. Future: scrollable.
Host clicks while scene is transitioningDebounce — ignore clicks during transition.

Dependencies

Upstream

SystemDependency TypeInterface
Map SystemHardProvides MapLayout data

Downstream

None — leaf node.

Tuning Knobs

KnobDefaultSafe RangeAffects
node_icon_size48px32-72pxReadability
connection_line_width3px2-6pxVisual clarity
available_glow_intensity0.80.3-1.0How obvious available nodes are

Acceptance Criteria

#CriterionVerification
1All nodes and connections render correctlyVisual test: generate map, assert all nodes visible with correct icons
2Current node highlightedVisual test: assert current node has distinct visual
3Available nodes glow and are clickable (host)Visual test: host can click available nodes
4Non-host cannot select nodesIntegration test: non-host click → no effect
5Visited nodes dimmedVisual test: revisit map after combat, assert previous node dimmed
6Node tooltip shows type info on hoverVisual test: hover over node, assert tooltip appears
Built with LogoFlowershow