Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
81fcb2b
docs/TODO/204 is planned: the ship flies by touch
cgreening Sep 10, 2026
aceb0fc
docs/TODO/204 M1: the input takes a wanted speed and a held button
cgreening Sep 11, 2026
e05dea6
docs/TODO/204 M2: the touch overlay: drag to steer, hold to fire, sli…
cgreening Sep 11, 2026
db05c9d
docs/TODO/204 M3: the command row and the tappable prompts
cgreening Sep 11, 2026
4482c43
docs/TODO/204 M4: the flight menu
cgreening Sep 11, 2026
dccf994
docs/TODO/204 M5: fullscreen on the first touch, and the manual says …
cgreening Sep 11, 2026
c6ca59c
docs/TODO/204: the touch checks move to their own test files
cgreening Sep 11, 2026
56a5423
docs/TODO/204 lands, and the queue is empty
cgreening Sep 11, 2026
95b9e92
docs/TODO/204: the whole screen steers, and a drag up raises the nose
cgreening Sep 11, 2026
16b04c2
docs/TODO/205 to 208 are planned: the pilot picks a course, and the s…
cgreening Sep 11, 2026
d8f16db
docs/TODO/205 M1: the touch controls leave, and the held button stays
cgreening Sep 11, 2026
a94932a
docs/TODO/205 M2: the course list says what the ship can do next
cgreening Sep 11, 2026
09ea4e7
docs/TODO/205 and 206: Chris's answers of 2026-09-11
cgreening Sep 11, 2026
dc72f61
docs/TODO/205 M3: the station course flies the ship into the slot
cgreening Sep 11, 2026
ea9c5f7
docs/TODO/205 M3: the derelict, hermit and star courses, and no ship …
cgreening Sep 11, 2026
071492e
docs/TODO/205 M4: the LAUNCH row asks where the ship goes
cgreening Sep 11, 2026
ce76026
docs/TODO/205 M5: the course list flies with the ship, as buttons ove…
cgreening Sep 11, 2026
c1fe4c4
docs/TODO/205 M7: the fast forward button shortens the wait
cgreening Sep 11, 2026
e696336
docs/TODO/205 M6 lands 205: the manual and the briefing teach the but…
cgreening Sep 11, 2026
30858bb
docs/TODO/206 M1: the target list says what the ship can fight
cgreening Sep 11, 2026
fdfb70d
docs/TODO/206 M2 and M4: every pilot gets the aim, and the bought com…
cgreening Sep 11, 2026
1e8561c
docs/TODO/206 M3: the pilot's hands are buttons: laser, missile, E.C.…
cgreening Sep 11, 2026
ae0645c
docs/TODO/206 M5: the ways out of a fight are buttons
cgreening Sep 11, 2026
6b1b99d
docs/TODO/206 M6: collect everything, and mine the asteroids
cgreening Sep 11, 2026
b71ead7
docs/TODO/206 lands: the manual and the briefing teach the fight
cgreening Sep 11, 2026
956a545
docs/TODO/207 M1 and M3: the pilot flies the last stretch, and the sl…
cgreening Sep 11, 2026
3f4568b
docs/TODO/207 M2: the roll strip and the throttle buttons fly the slot
cgreening Sep 11, 2026
7f80051
docs/TODO/207 M4: the guide teaches the last stretch, and the course …
cgreening Sep 11, 2026
fc11b10
docs/TODO/207 lands: the pilot flies the slot, and the slot checks th…
cgreening Sep 11, 2026
762ea97
docs/TODO/208 M1 and M2: a mission is the first button over the view
cgreening Sep 11, 2026
61dc6ed
docs/TODO/208 M3: the scoop rows cannot trap a pilot, and a hunt cann…
cgreening Sep 11, 2026
9ecbe59
docs/TODO/208 M4: a smuggling run slips past the police
cgreening Sep 11, 2026
2b349e6
docs/TODO/208 M5: a derelict tells what the scan finds
cgreening Sep 11, 2026
7d3acfc
docs/TODO/208 lands: every kind of mission has a way to fly it
cgreening Sep 11, 2026
6d4ade4
The destination is picked on the local chart, not the galactic one
cgreening Sep 12, 2026
5a41552
docs/TODO/209: the torus drive says what stopped it
cgreening Sep 12, 2026
d3d033c
docs/TODO/210: the ship does not roll all the way there
cgreening Sep 12, 2026
d85efd8
docs/TODO/211: the ship stops short of the rock
cgreening Sep 12, 2026
2760fe9
docs/TODO/212: the computer lines up, and the pilot plays the slot
cgreening Sep 12, 2026
40ae546
docs/TODO/212: the ship stops on the line, and the pilot thrusts in
cgreening Sep 12, 2026
31dafed
The co-pilot aims ahead of a ship, and it stops chasing one that circles
cgreening Sep 12, 2026
109676c
The computer finishes the line-up before the pilot gets the slot
cgreening Sep 12, 2026
6d5dbdb
The docking computer flies the last turn onto the slot axis
cgreening Sep 12, 2026
cb248f6
Every commander gets the same line-up, and the cone is five times tig…
cgreening Sep 12, 2026
5abc879
A course can be stopped, and a fight stops it for you
cgreening Sep 12, 2026
cea5f3c
The slot is hard for a hand, and kind to a bought computer
cgreening Sep 12, 2026
152459b
The record: a review of the combat computer, and its probes
cgreening Sep 12, 2026
7caca66
The co-pilot banks before it pulls, and the tracking tests say so
cgreening Sep 12, 2026
c54bde5
The computer shoots what it aimed at, and answers a warhead with no ship
cgreening Sep 12, 2026
b12e1a8
One handover contract: the rates are the ship's, and the memory is th…
cgreening Sep 12, 2026
c9bf0af
A commitment has to be going somewhere, and the lead survives re-meas…
cgreening Sep 12, 2026
1198911
A fight starts on two soft pings, not one hard beep
cgreening Sep 12, 2026
7a53638
The fight cue is a couple of beeps
cgreening Sep 12, 2026
6ff43d9
The fight cue is soft, and the voice was always the problem
cgreening Sep 12, 2026
48b9f12
The fight cue whoops twice
cgreening Sep 12, 2026
964ea0c
The computer engages once, and it was engaging sixty times a second
cgreening Sep 12, 2026
787b35d
A course goes round what it would hit
cgreening Sep 12, 2026
2d7af57
The collect course holds one canister, and leads it
cgreening Sep 12, 2026
dc2973d
The docking computer is a button, not an automatic
cgreening Sep 12, 2026
cb7785b
The collect course flies slowly enough to correct
cgreening Sep 12, 2026
9f7f8d3
Two reviews read the missions, and two plans answer them
cgreening Sep 13, 2026
e2b0fe6
docs/TODO/213 M1: a hit trader goes back to work, and the escort ends
cgreening Sep 13, 2026
1af5cbe
docs/TODO/213 M2: a side job comes back, the goods leave, the arcs st…
cgreening Sep 13, 2026
e2bbabb
docs/TODO/213 M3: the gun warning speaks for the Constrictor, and a b…
cgreening Sep 13, 2026
27f0ca0
docs/TODO/213 M4: the save, the journal, the standing and the restore…
cgreening Sep 13, 2026
db72eee
docs/TODO/213 M5: the lint holds every trigger a verb can emit, and s…
cgreening Sep 13, 2026
05f6bb7
docs/TODO/213 lands: the mission rules hold, and a hit trader goes ba…
cgreening Sep 13, 2026
212ed29
docs/TODO/214 M1: pirates wait at the jump-in
cgreening Sep 13, 2026
ee92456
docs/TODO/214 M2: a scoop springs an ambush
cgreening Sep 13, 2026
ce6ede9
docs/TODO/214 M3: an escort is the commander's to keep
cgreening Sep 13, 2026
75fb94d
docs/TODO/214: the flight probe after the three surprises, and the in…
cgreening Sep 13, 2026
12a3e2b
The target list is its own column, on the left
cgreening Sep 13, 2026
4dedc98
docs/TODO/215 M1: the gun row lives in the console
cgreening Sep 13, 2026
f45e0fb
docs/TODO/215 M2: a list folds to a header, and opens as one row that…
cgreening Sep 13, 2026
0eca5c2
docs/TODO/215 M3: the manual says where the guns are
cgreening Sep 13, 2026
9890b16
docs/TODO/215 lands: the gun row lives in the console, and a list run…
cgreening Sep 13, 2026
37823ce
A key grid types a name on a phone
cgreening Sep 13, 2026
8456d08
The charts find and estimate by a button
cgreening Sep 13, 2026
225eb22
The levers and the trainer step by a button
cgreening Sep 13, 2026
b4c5e93
The chart search has its own file
cgreening Sep 13, 2026
88cd67d
Plan 216 lands: every docked screen carries a button for each key it …
cgreening Sep 13, 2026
b68a7d3
The hunt is a chase, and the side hunt fails when its target runs
cgreening Sep 13, 2026
fa63c30
The hunt counts a gang, and the side hunt is one
cgreening Sep 13, 2026
4b8276a
The board gates the hard jobs by kills
cgreening Sep 13, 2026
3edb869
The gang is the Asp, the Krait and the Mamba
cgreening Sep 13, 2026
2c4f792
Plans 214 and 217 land: a job has a surprise in it, and the side hunt…
cgreening Sep 13, 2026
dc08e71
The commander is they, not she
cgreening Sep 13, 2026
50e956e
Plan 218 lands: the commander is they, not she
cgreening Sep 13, 2026
00194a6
Plan 219 is written: the Dark Wheel comes for a commander
cgreening Sep 13, 2026
3bf823c
The phone holds its zoom, hides its bar, and reads the chart
cgreening Sep 13, 2026
6326c6f
Plan 220 lands: the phone holds its zoom, hides its bar, and reads th…
cgreening Sep 13, 2026
d404d72
The Dark Wheel is a patron, and the lawless worlds carry its word
cgreening Sep 13, 2026
3756833
The blockade: a parcel past three Vipers, on a clean record
cgreening Sep 13, 2026
2a39cb7
A leg in witchspace, and the pilot the Wheel wants back
cgreening Sep 13, 2026
47b927f
The door: a Thargoid guards it, and the cloak is behind it
cgreening Sep 13, 2026
2595e46
The cloaking device, which no shop sells
cgreening Sep 13, 2026
1de03ff
Plan 219 lands: the Dark Wheel comes for a commander
cgreening Sep 13, 2026
a4beac9
The Dark Wheel's four dossiers
cgreening Sep 13, 2026
85c51e9
The fast forward button is an icon
cgreening Sep 13, 2026
de366c8
Plan 221 lands: the fast forward button is an icon
cgreening Sep 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ joystick the original supported.
| 1 2 3 4 | front / rear / left / right view |
| T / M / U | arm missile (locks in your sights) / fire / unarm |
| E / TAB | E.C.M. / energy bomb (if fitted) |
| Z | cloaking device — nobody sees you while it runs (if you ever come by one; no shop sells it) |
| J | torus jump drive (8×, stars streak; cuts out when mass-locked) |
| C | docking computer — flies you in; press again or touch the controls to take over |
| ⇧C | contracts — the work you have signed for; the board itself is a station's |
Expand Down
66 changes: 56 additions & 10 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,40 @@ rules. This file is a map.
on the GPU. The controls read an input interface, not the browser. Two pointer
seams cross the platform seam. `onScreenClick` is input. `onScreenMove` reports
only: a screen may repaint what it describes, but it must never select or
spend.
- The HUD is a read-only painter, and it is three files. `hud/hud-model.ts`
spend. `engine/hold-buttons.ts` is the third: a button that holds a key down
while it is held, such as the laser (docs/TODO/206).
- The HUD is a read-only painter, and it is four files. `hud/hud-model.ts`
works out where a marker goes. `hud-binding.ts` turns the state into a
dashboard. `hud.ts` paints one. A screen lives behind `ui/screen-host.ts`, and
dashboard. `hud.ts` paints one. `hud-buttons.ts` paints the buttons over the
flight view, such as the course buttons, and a click on one sends its code
(docs/TODO/205). A screen lives behind `ui/screen-host.ts`, and
it reaches the page through `ui/screen-shell.ts`. A screen owns its own
rendering, its own input and its own local state.
- `src/game/prompts.ts` decides what a key can do about the situation right now.
It returns a `Command` and words. It never returns a letter. `cockpit-view.ts`
looks the label up, through `ui/key-help.ts`. That is how invariant 9 reaches
prose. A prompt is derived state, and the code saves nothing about it.
- `src/game/courses.ts` decides what the ship can do next with no hand on the
stick (docs/TODO/205). A course is one such thing, such as a trip to the
station or a skim of the star. It follows the shape of `prompts.ts`: a flat
view in, a ranked list out, and no key. The list is derived state. The code
saves the course that the pilot picks, and never the list.
`course-pilot.ts` flies the picked course, one frame at a time, and it
reports a `FlightDemand`. `flight-instruments.ts` throws the switches that a
course asks for: the torus drive, the hand-over to the docking computer, and
the end of the course. A commander with no docking computer gets the docking
mini game (docs/TODO/212). EVERY commander gets the same line-up first. The
computer flies the ship to the right distance from the station, stops it, and
turns it to face the port. `world-step.ts` then asks the one question: a
fitted docking computer takes the ship in, and a commander with none gets the
rails and the game. `dock-rails.ts` holds the ship on the slot axis while the
pilot matches the slot and the speed. It is the one file that moves the
commander's ship other than by flying it, and it only ever takes up a residue.
The last turn is flown, with `bankToTurn` and both sticks. `course-actions.ts` joins the list to the Game: it
builds the flat view, and it applies a pick. At the station, the LAUNCH row
opens `screens/courses.ts`, and a pick leaves on the course. In flight, the
list is a set of buttons over the view, and not a screen, because the flight
world stops under a screen.
- The console is one line, so `SessionState.queued` is the line that waits for it
(`session.ts`). Some consequences make sense only after their cause: what a
scan cost your legal record, or what a deed cost your reputation. The console
Expand All @@ -51,13 +75,16 @@ rules. This file is a map.

**Two halves split what a commander does.** Neither half reaches into the other.

- `docked.ts` — what she does once the ship stops. The arrival, the menu, the
- `docked.ts` — what the commander does once the ship stops. The arrival, the menu, the
market, the outfitters and the board are here.
- `flight.ts` — what she does in the sky. That is one slice of time advanced,
- `flight.ts` — what the commander does in the sky. That is one slice of time advanced,
and who is at the controls for it. It has two children of its own:
- `flight-weapons.ts` — what the ship spends, and what it takes. Laser fire is
here.
- `flight-instruments.ts` — the switches that change who flies the ship.
- `flight-course.ts` — the course at the controls. Three things end it. The
work is done, or the pilot taps the lit button, or a hostile ship turns up.
It left `flight-instruments.ts` on 2026-09-12.

A step that ends in a dock, a jump, a tow or a death reports that end to
`game.ts`. The orchestrator then decides what the game becomes.
Expand All @@ -68,7 +95,7 @@ spends:
- `world-build.ts` — what is in the sky when you arrive.
- `cockpit-view.ts` — what the cockpit shows about the world.
- `law-actions.ts` — what the law does to a commander. It applies a record.
- `hyperspace-actions.ts` — how a commander leaves a system, and how she arrives
- `hyperspace-actions.ts` — how a commander leaves a system, and how they arrive
in one. The jump is here.
- `career.ts` — what a career keeps when a flight ends.
- `persistence.ts` — the world written down, and put back.
Expand Down Expand Up @@ -156,6 +183,20 @@ Two quirks are deliberate:
both callers agree. `combat.ts` takes each ingredient separately, so a test can
drive it. `combat-player.ts` is the assembly step that builds the player's own
trigger out of one `GameState`.
- `src/game/targets.ts` lists what the ship can fight, and holds the pilot's
pick (docs/TODO/206). The pick is one flag on the picked ship's own state,
so a save carries it. It sits on top of `threat-lock.ts`, and never changes
that rule. `target-actions.ts` joins the list to its buttons, and gives each
ship a code that names it for as long as it lives. `close-pass.ts` names a
neutral trader that comes close, one time, so the pilot knows the chance is
there (docs/TODO/209). It never stops the ship.
`cockpit-buttons.ts` says what every button over the flight view reads, in
words, and it holds no world (docs/TODO/206 M5). `game/mission-course.ts`
says what a live mission asks the ship to do here (docs/TODO/208). There
are five shapes: a fight, a hold, an escort, a scoop, and a slip past the
police.
`game/derelict.ts` says what a scan of a derelict reports, read off the
world's own seed.
- `src/game/threat.ts` computes the pirate count, the group tier and the
organisation from the visible value and the reputation. `ship-specs.ts` maps a
tier to a hull. The campaign simulator calls the same rules.
Expand Down Expand Up @@ -196,22 +237,27 @@ Two quirks are deliberate:
- `src/game/mission-bridge.ts` is the game's side of the mission machine. It
runs one input, installs the record on the commander, and applies the
effects that are the commander's: credits, reputation and legal status. It
hands the words back, and the caller says them. `src/game/mission-desk.ts`
hands the words back, and the caller says them. It hands a spawn order
back too, and the world step spawns an ambush (docs/TODO/214). `src/game/mission-desk.ts`
is the MISSIONS screen's two actions, acceptance and abandonment, and the
offers it lists. `src/game/hunt-warning.ts` prices her gun against the ship
offers it lists. `src/game/hunt-warning.ts` prices the commander's gun against the ship
a hunt names, through the combat oracle.
- `src/missions/` is the mission machine (docs/TODO/190). `model.ts` holds the
types. A skeleton under `skeletons/` is one mission's rules, written by a
types, `effects.ts` the consequences the game applies, and `words.ts` the
shape of a patron and a dossier. A skeleton under `skeletons/` is one mission's rules, written by a
developer. A dossier is its generated words, and the machine never reads one.
`machine.ts` is one pure step. It takes the record, one input and the facts
it may read. It returns a new record with the effects the game applies.
`settlement.ts` applies a branch's settlement, and `leads.ts` saves a lead
(docs/TODO/217).
A verb module under `verbs/` decides what an input means for one leg, and
the machine takes the branch. `triggers.ts` says what a trigger is called,
and which dossier line a branch may speak with. `lookups.ts` reads a
skeleton: a leg by id, a patron's key, and where a skeleton is offered. `placement.ts` picks a leg's world with one
draw. A band measures tenths on the chart. A handover measures jumps on
the full-tank graph. `tour.ts` places the five arc starts from the seed,
and a galactic jump moves a lead by the same rule (docs/TODO/192). `queries.ts` answers the game's questions without a change. `lint.ts`
and an arc is offered in galaxy 1 alone. So a lead keeps its galaxy across
a galactic jump (docs/TODO/213). `queries.ts` answers the game's questions without a change. `lint.ts`
holds the five failure rules as data checks, and
`test/mission-skeletons.test.ts` runs it over every skeleton. `repair.ts`
reads a saved record for both loaders, and drops the old stage number.
Expand Down
Loading