Design: the world

Proposed, 30 October 2026, with Mark. The traffic (section 9, steps 1 to 4) was built the same day for Show HN, at Mark's word: "This is the missing piece, lets get it done before HN." The rest waits. Change by pull request.

Mark asked how the galaxy should feel, and how it should work underneath:

This document answers all three. It builds on markets and trade (world events), companies and contracts and the companies, the Titanoboa and its yards, the Falcons (a Legend who remembers you), exploration (the Constrictor's trail), radio and comms, shared space and servers and hosting.

Principles


As built (30 October 2026)

How the first steps work in the game (Modern rules; Classic keeps 1984's traffic):

1. Where we are

Checked against the code on 30 October 2026.

Solo play: one galaxy, worked out the same way on every phone.

Shared space: real commanders only, one system at a time (shared space). The server referees moves, lasers, missiles and collisions. The NPCs aren't shared: two commanders side by side each see their own pirates.

What's missing:


2. Three layers

Layer What Made by Lasts
Traffic Pirates, police, nameless traders Your phone, at random Until you leave
The world Markets, events, companies, Saloons, the yards, and now routes, convoys and company fleets The seed and the clock: the same for everyone Always, worked out when needed
Characters Named people with a home, a ship, a goal and a memory of you The seed, the clock and their story so far Always; their stories change

The traffic is the crowd. The world is the weather and the timetable. The characters are the faces.


3. The method

3.1 Everything is a function of time

state = f(seed, t)

Randomness comes from a hash, not dice: hash(system, salt, index) in economy/seed.ts gives a number from 0 to 1 that's the same on every phone. The Saloon, events and yards already use it.

3.2 A convoy is a timetable, not a ship

A route is a list of systems and, in each, a path: the witchpoint, a bend round the planet, the station's slot. A convoy on it is a departure:

period = 40 min                        how often one leaves
phase  = hash(route) × period          so routes don't all leave together
k      = floor((t − phase) / period)   which departure this is
age    = t − (phase + k × period)      minutes since it left
where  = route(age × speed)            a point on its path

Only departures whose age is less than the trip time exist, so a few sums give every convoy on the route, in place, on every phone. The path through a system is a smooth curve (Catmull-Rom through the waypoints), flown at the hull's own top speed and turn rate, so it looks flown, not slid. A jump between systems is a gap in the timetable the length of a hyperspace jump.

3.3 Only calculate where you are

Nobody works out the whole galaxy. Each system keeps a small index of the routes through it, built once from the seed. Arriving at Onrira, the game asks: which routes pass here, and who's on them now? That's a few dozen sums for one system. News works the same way: what's the nearest convoy lost, and how long has its news taken to arrive (events already travel at the speed of ships)?

3.4 The economy sets the numbers

demand  = a world's shortfall of a good      (events.ts already has it)
rate    = k × demand                          departures an hour
depart in slot n  if  hash(route, n) < rate × slot length

That's a random arrival process with its dice taken from a hash, so the same for everyone. A famine raises the shortfall, more food convoys leave, and pirates follow them, all from one equation. Prices then move as cargo arrives, as they already do with NPC trade.

3.5 Players' actions are exceptions

world(t) = f(seed, t)  +  exceptions
exceptions = [ convoy 1234 destroyed at 14:02 by CMDR X,
               Bond helped by CMDR Y, ... ]

The server keeps the exceptions; each is a row. Consequences are arithmetic on the timetable and the list:

progress(t) = scheduled deliveries before t − deliveries lost

Lose enough of the Titanoboa's convoys and the station falls behind, the news says so, and its stage takes longer. Nothing was running to make that happen.

3.6 A formula far away, a real ship up close

3.7 Testable

Any moment of the galaxy, past or future, can be worked out in a test: "at 14:00 on 3 November, which convoys are at Onrira?" Every phone must agree with the test, and the server can check a commander's claim ("I robbed convoy 1234") against the same formula.


4. Traffic that tells the story of the world

4.1 The companies fly as themselves

Company In space
Wexley-Yorozu Tidy convoys on timetables; the yards; tug teams hauling Titanoboa modules, slowly, under escort
Hexon Polished freighters with their own "security", which isn't police: they don't care about your crimes, only their cargo
Vorg Rough ore haulers and mining crews at the asteroid fields; they'll sell you anything
The Carriers' Mutual Independent captains, one ship each; they answer a distress call when one's in range
The Co-operative Police and Marshals, as now; medical ships under escort in a plague

Each flies in its colours, from the companies, on hulls that suit it.

4.2 Events you can see

4.3 Work that isn't fighting

Miners at asteroid fields, surveyors over a new find, couriers in a hurry, salvage crews over a wreck, a passenger liner, a racing gate on a workers' day off.

4.4 More hulls

Every working ship needs a silhouette: freighters, liners, tugs, mining ships. This is the community's job: contributors design them through the MCP server, and each accepted design gives the galaxy a new shape. Until then, the existing hulls in company paint.

4.5 What you can do with them


5. What players change: exceptions

Exceptions are what makes the world respond. The question is whose world they change.

Where What changes Kept
Solo, on your phone Your own world: the convoy you robbed is gone for you In your save
Shared space Everyone's: the server saw it happen On the server, a row each
Story beats (section 6) A character's memory of you is yours; a few big beats (the prototype found) are everyone's On the server

Starting point: solo changes stay yours; shared-space changes are everyone's, because the server refereed them. A commander who robs a convoy in solo has a world one convoy shorter. A wing that saves the yard's supply line in shared space has saved it for everybody. (Open question 2.)


6. Characters

A character is the world's method with a plan on top:

plan     = legs worked out from the seed and the story so far
where(t) = plan evaluated at t

"Tuesday, the corner seat in the Saloon at Isinor. Wednesday, out to a sighting on the trail. Back by Friday." When a player changes the story, the plan is worked out again from that moment.

6.1 Worked example: CMDR Bond, 007, retired

Mark's character (30 October 2026). An easter egg first, and a mentor at most: never the lead of a story, and never "James Bond" in anything public. He's just Bond.

6.2 Saloon regulars with ships

Mark: "Some of those Characters will be from the saloon, but they have their own ships and fly around the systems doing what they do." Today's regulars (saloon.ts) are made for each station and hour. A named regular is a character: the same person in the same Saloon on their days there, and out on their route the rest of the week. You might drink with a smuggler on Monday and pass her ship, running dark, on Thursday.


7. Worked example: the Titanoboa's supply line

A yard at Onrira (yards.ts) is building a station. Today, Bullsnakes run ore from the moon on the clock. Added:

  1. Its needs: electronics, food and life support, by stage (the frame needs more electronics; the habitat ring needs food and life support). Each is a shortfall at Onrira.
  2. Its routes: from the nearest worlds that make each good: say electronics from a high-tech world three jumps away, food from an agricultural one next door. Built from the galaxy's seed, the same for everyone.
  3. Its timetable: departures at the rate the shortfall sets (section 3.4), Wexley-Yorozu freighters in company colours, with escorts on the longer route.
  4. What you see: freighters at the witchpoint on their way in; a queue at the Titanoboa's hold; a tug team coming the long way with a replacement reactor.
  5. What you can do: escort the electronics run (a contract); warn a convoy of pirates; rob one, and Wexley-Yorozu's file on you says so.
  6. What follows: the yard's progress is deliveries made minus deliveries lost. Lose enough and the station opens late, and the news says why. In shared space, a wing that keeps the route open has done it for everyone.

8. Cost


9. Steps

Step What Size Worker deploy
1 Routes and timetables: the route index, the convoy formula, convoys drawn in solo (existing hulls in company colours), hailing them Medium No
2 Traffic from the economy: rates from events' shortfalls; famine convoys, refugee liners, medical ships Medium No
3 The Titanoboa's supply line: needs by stage, routes, progress from deliveries Medium No
4 Up close, a real ship: the hand-over to an NPC and back; escort and piracy Medium No
5 Exceptions: in your save in solo; on the server from shared space Small Yes
6 The first character, Bond: his Saloon, his plan, his memory of you, his rare flights Medium Yes
7 Characters in shared space: flown by the system's server Medium Yes
8 Working hulls from the community: freighters, liners, tugs, through the MCP server Ongoing No

Steps 1 to 4 need no server, so they can start straight after Show HN.


Next for the supply line

10. Open questions for Mark

  1. The order: Traffic and the Titan first (Mark, 30 Oct 2026: "Traffic and Titan ( which i prefer rather than Titanoboa ) and traffic"), then Bond. Mark prefers the name Titan to Titanoboa; renaming her across the game, site and docs is its own change.
  2. Solo changes: stay in your own world (recommended), or count for everyone when you're signed in?
  3. How busy: how many convoys in a quiet system, and in a busy one? Too many and the lanes feel like a motorway; too few and nobody meets one.
  4. Bond's world: which agricultural system does he retire to?
  5. The second character: a Saloon regular with a ship (Mark's first idea), a Marshal, a smuggler, or a Mutual captain?

Think something here should change? Say so on the ideas board, where others can vote it up, or email hello@witchspace.org.uk. If you code: this page is docs/design/the-world.md on GitHub, open to pull requests.