Skip to main content

Minimap System

The minimap provides real-time navigation and entity tracking with RS3/OSRS-accurate dot colors and location icons.
Minimap code lives in packages/client/src/game/hud/Minimap.tsx and renders entities, locations, and the destination marker on a 2D canvas overlay.

Entity Dot Colors

The minimap uses RS3/OSRS standard color scheme:
RS3/OSRS Accuracy: The color scheme matches RuneScape 3 and Old School RuneScape conventions. White for players, yellow for NPCs, red for items.

Local Player Marker

The local player renders as a white square instead of a circle:
This makes it easy to distinguish your character from other players at a glance.

Destination Marker

When you click to move, a red flag appears at the destination:
Before: Red dot (hard to see, not distinctive) After: Red flag with pole and triangle (RS3-style, highly visible)

Location Icons

Key locations display custom icons instead of generic dots:

Bank Icon ($)

Shop Icon (Bag)

Prayer Altar Icon (Cross)

Runecrafting Altar Icon (Purple R)

Anvil Icon

Furnace Icon (Flame)

Cooking Range Icon (Steam)

Fishing Spot Icon (Fish)

Mining Rock Icon (Pickaxe)

Tree Icon (Green Circle)

Quest NPC Icon (?)

Icon Detection

The minimap automatically detects entity subtypes to assign the correct icon:

Station Type Detection

NPC Service Detection

NPCs with services (bank, shop, quest) display the appropriate icon:

Resource Type Detection

Resources (trees, rocks, fishing spots) display skill-specific icons:

Size Hierarchy

Icons use a size hierarchy for visual clarity:

Rendering Pipeline

The minimap uses a multi-pass rendering approach:
  1. Clear canvas - Transparent background
  2. Draw terrain - Optional terrain overlay (future feature)
  3. Draw entity dots - Players, mobs, items
  4. Draw location icons - Banks, shops, altars, resources
  5. Draw destination marker - Red flag for movement target
  6. Draw compass - Optional compass overlay

Icon Drawing Function

The drawMinimapIcon() function handles all location icon rendering:
Return Value:
  • true if icon was drawn (skip default dot rendering)
  • false if no icon exists for this subtype (fall back to colored dot)

Entity Pip Structure

Each entity on the minimap is represented by an EntityPip:

Performance Optimizations

The minimap uses several optimizations for smooth rendering:

Entity Caching

Cleanup

Entities that no longer exist are removed from the cache:

Minimap Controls

The minimap supports several user interactions:
  • Click to move - Click anywhere on the minimap to pathfind to that location
  • Zoom - Scroll wheel to zoom in/out
  • Drag - Drag the minimap window to reposition (edit mode)
  • Resize - Resize the minimap window (edit mode)