Trade Route Calculator: Architecture Deep Dive

How we designed the core trade route engine — pathfinding, cargo optimization, and profit estimation.

March 27, 2026 · 1 min read

Why Build This

Star Citizen's economy is complex. Hundreds of commodities, dozens of locations, volatile prices. Pilots need to know: what should I carry, from where, to where, and how much profit will I make?

That's the trade route calculator — the core feature of SC TradeMasters.

The Engine

We model the Star Citizen economy as a weighted directed graph. Nodes are locations (stations, outposts, cities). Edges are routes with travel time and risk scores. Commodities have buy/sell prices at each node.

The calculator runs a modified Dijkstra's algorithm that optimizes for profit-per-hour rather than shortest path. It factors in cargo capacity, fuel costs, and commodity price spreads.

Cargo Optimization

Given a ship with X SCU cargo space, which combination of commodities maximizes profit on a given route? This is a variant of the knapsack problem. We use a greedy approximation that's fast enough for real-time calculation.

What Excites Us

Soon you'll be able to ask: "I have a Caterpillar with 576 SCU. What's my best 30-minute trade run?" and get an instant, optimized answer. That's the dream.

star-citizenarchitecturealgorithms