CustomWaypoints: Rethinking Navigation in WoW Through Graph-Based Routing
An exploration of building a smarter routing engine for World of Warcraft
Table of Contents
- Introduction
- The Problem: Euclidean Thinking in a Non-Euclidean World
- Why CustomWaypoints Exists
- System Design: From Waypoints to Graphs
- Deep vs Minimal Routing
- Transport Awareness
- Heuristics vs Reality
- The Hard Part: Not Breaking Everything
- What This Became
- What I Learned
- Final Thought
Introduction
While working on a custom addon for WoW (Warmane, WotLK 3.3.5a), I ran into something that felt fundamentally off. Navigation addons like Carbonite are incredibly useful. They provide map overlays, waypoint systems, and routing with a directional arrow that guides you through the world. For most players, this is more than enough. But when I started pushing the system harder β long routes, intercontinental travel, optimization β I realized something: π the routing model itself is flawed. Not visually. Not UX-wise. But architecturally.
The Problem: Euclidean Thinking in a Non-Euclidean World
The failure cases I wanted to address were routes where geometric proximity did not describe the usable connections. Carbonite already has routing and transport machinery; CustomWaypoints builds a controllable layer around it rather than introducing graph routing to an otherwise geometry-only addon. And while this works for short distances, it breaks down quickly in a game like WoW. Because WoW is not a continuous space. It is a constrained graph. Zones connect only through specific gates, continents are disconnected without transports, movement is governed by portals, boats, zeppelins, trams, and flight paths depend on discovery state. Yet the routing logic still behaves like "just walk there". You've probably seen it: walking toward unreachable terrain, ignoring portals entirely, bypassing optimal travel methods, failing to use flight masters correctly. At that point, the arrow is no longer guidance. It's just a suggestion.
Why CustomWaypoints Exists
CustomWaypoints started from a simple frustration: I don't want a direction. I want a valid path. So instead of trying to tweak Carbonite's behavior, I built a layer on top of it. The idea was to keep Carbonite as a visualization engine and replace the routing logic with something explicit and controllable.
System Design: From Waypoints to Graphs
At its core, CustomWaypoints introduces a different abstraction. Instead of points in space connected by distance, we define nodes (zones, gates, portals, flight masters, transport hubs), edges (walk, taxi, portal, etc.), and cost functions (time, distance, penalties). This turns navigation into a classic graph problem. Transitions become explicit and optimization becomes tunable. A shortest path is still only as valid as the graph: same-map walking edges use estimated travel costs, not a terrain mesh or a collision-aware pathfinder. Instead of asking "where is the target?" we ask "what is the cheapest valid path to the target?"
Deep vs Minimal Routing
One of the most interesting design choices was introducing two routing modes. The minimal mode keeps the path simple, relies partially on Carbonite expansion, and only uses essential transport nodes, making it suitable for quick routes and short distances. In contrast, the deep mode expands the full path explicitly, inserts intermediate nodes like zone transitions and gates, and produces a fully deterministic route, ideal for long routes and complex navigation. This distinction exists because sometimes you want control, and sometimes you want speed. And these are not the same problem.
Transport Awareness
A major limitation in default routing is the lack of transport modeling. CustomWaypoints treats transports as first-class edges: portals, zeppelins, boats, trams, and flight masters. Each has entry constraints, cost, and availability (e.g., discovered vs. not). This allows the system to do something very simple but very powerful: compare fundamentally different travel methods in the same graph. For example, it can weigh a short walk against a long portal chain, taxi versus manual traversal, or multi-hop intercontinental routes.
Heuristics vs Reality
The current CustomWaypoints.lua keeps an A*-shaped search but deliberately uses a zero heuristic:
local function HeuristicCost()
return 0
end
With non-negative edge costs, this is uniform-cost search, equivalent to Dijkstra's choice of the next cheapest frontier node. It retains optimality for the constructed graph. A geometric travel-time estimate can overestimate the remaining cost when a cheap portal crosses a large distance; that is why an unproven distance heuristic is risky here.
The relaxation step is concrete. This excerpt omits predecessor bookkeeping and open-list insertion:
local tentative = (gScore[current] or huge) + (edge.cost or huge)
if tentative < (gScore[edge.to] or huge) then
came[edge.to] = current
cameEdge[edge.to] = edge
gScore[edge.to] = tentative
fScore[edge.to] = tentative + HeuristicCost(nodes[edge.to], nodes[goalId])
end
The excerpt selects the relaxation logic; the open-list update is omitted, so it is not a standalone search function. The full implementation scans openList to find the smallest score rather than using a priority queue. That keeps the code straightforward but makes frontier selection linear in its current size.
Walking costs also expose the model's assumptions. This complete helper converts world-coordinate distance into estimated seconds:
local function WalkCostSeconds(wx1, wy1, wx2, wy2)
local yardsPerSecond = (STATE.db and STATE.db.walkYardsPerSecond) or 7
if yardsPerSecond <= 0 then yardsPerSecond = 7 end
local d = Dist(wx1, wy1, wx2, wy2)
if not d then
return huge
end
return WorldToYards(d) / yardsPerSecond
end
A shortest estimated route is not necessarily the fastest observed journey. Waiting for a boat, inaccessible terrain, missing connector data and tuned penalties all affect that gap. The useful guarantee is about the encoded costs, not perfect knowledge of the game world.
The Hard Part: Not Breaking Everything
The biggest challenge wasn't building the routing. It was integrating it safely. Carbonite still renders paths, expands routes, and controls UI behavior. The queue belongs to CustomWaypoints; the Carbonite route is derived output. Synchronization pushes a reduced set of anchors, and selected transport hops stay straight so Carbonite does not re-expand a route decision that was already made. An internal clear during synchronization must preserve the queue, while a user-initiated clear must remove it. These are explicit contracts in docs/invariants.md and docs/routing-notes.md. This turned into a system problem: not just pathfinding, but state synchronization between two engines.
What This Became
At some point, this stopped being "an addon". It became π a routing engine inside a game. With graph modeling, cost tuning, transport abstraction, and multi-layer system integration.
What I Learned
For this addon, graph connectivity and ownership of the queue mattered more than drawing another arrow. Geometric distance still has a role inside the cost model; it is not sufficient to represent transport availability or map transitions. A heuristic needs a justified lower bound, and UI symptoms can expose disagreements about which component owns route state.
Final Thought
I didn't build CustomWaypoints to add features. I built it because the existing system was making the wrong assumptions. And once you see that⦠you can't unsee it. From that point on, you're no longer fixing waypoints. You're fixing the model.
This post is part of my exploration into game development and optimization. Stay tuned for more!