You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -104,6 +105,8 @@ The backend leverages Cloudflare's edge network.
104
105
105
106
-**`runGameStateAction(ws, action, onSuccess)`**: Generic handler that reduces boilerplate across all 12+ action handlers. Fetches current state from storage → runs engine function in try/catch → on validation error sends error message to the WebSocket → on exception logs with game code/phase/turn and sends error (state is preserved via clone-on-entry) → on success invokes `onSuccess` callback (typically save state + broadcast). `handleTurnTimeout` has equivalent try/catch protection for the alarm-driven code path.
106
107
108
+
-**Shared protocol validation**: Runtime C2S validation now lives in `shared/protocol.ts` instead of the server shell. The Durable Object still consumes `validateClientMessage()`, but the message-shape ownership sits beside the shared protocol types rather than inside server-only plumbing.
109
+
107
110
-**Single state-bearing outbound message per action**: `publishStateChange()` persists state and events first, then emits exactly one state-bearing message (`movementResult`, `combatResult`, or `stateUpdate`). If the resulting state is terminal, the DO appends a separate `gameOver` notification after that state-bearing message. This keeps client phase transitions aligned with a one-action/one-update contract.
108
111
109
112
-**Filtered broadcasting**: `broadcastFiltered()` checks whether the current scenario has hidden information (fugitive identities in escape scenarios). If no hidden info, the same state goes to both players. If hidden info, `filterStateForPlayer(state, playerId)` is called separately per player — own ships are fully visible, unrevealed enemy ships show `type: 'unknown'`. When adding new hidden state, extend `filterStateForPlayer()` and the check in `broadcastFiltered()`.
@@ -180,7 +183,7 @@ Delta-V is a fully installable PWA. A lightweight hand-written service worker pr
All messages are discriminated unions validated at the protocol boundary. `GameState` is the single source of truth — clients never mutate it; server owns all state mutations.
186
+
All messages are discriminated unions validated at the protocol boundary. Chat payloads are trimmed before validation and blank post-trim messages are rejected, so non-UI clients cannot inject empty log entries. `GameState` is the single source of truth — clients never mutate it; server owns all state mutations.
Copy file name to clipboardExpand all lines: docs/TECHNOLOGY.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ By understanding these visual motifs, players can immediately recognize the capa
12
12
Current chemical rockets have high thrust but terrible fuel efficiency (Specific Impulse / ISP), while ion drives have incredible ISP but microscopic thrust. Delta-V ships rely on sustained **Magnetic Confinement Fusion Drives**. Using Deuterium/Helium-3 reactions, these engines direct exhausted plasma out the back via a magnetic nozzle, providing both brutal thrust and incredible fuel efficiency, allowing for continuous rapid brachistochrone trajectories across the solar system.
13
13
14
14
**Visual Description & Image Placeholder:**
15
-
> *[IMAGE: To be generated - Close up of a massive Torch Drive]*
- Massive, realistically scaled engine bells or exposed magnetic nozzle rings.
17
17
- Emits a blinding, high-energy cyan or pure white exhaust plume.
18
18
- Usually surrounded by heavy, cylindrical magnetic confinement coil rings.
@@ -25,7 +25,7 @@ Current chemical rockets have high thrust but terrible fuel efficiency (Specific
25
25
In the vacuum of space, dissipating the extreme waste heat from fusion drives and railguns is a monumental challenge. Older ship designs use bulky, fragile radiator fins. The modern Delta-V fleet uses **Liquid Droplet Radiators** (spraying a stream of hot molten coolant directly into the vacuum and catching it meters away to radiate heat) and **Micro-Channel Cooling Arrays** (pumping coolant through hair-thin channels etched directly into the hull plating).
26
26
27
27
**Visual Description & Image Placeholder:**
28
-
> *[IMAGE: To be generated - Close up of a droplet radiator/glowing hull array]*
- Sleek, flush-mounted hull panels that glow faintly cherry-red or amber under load.
30
30
- Exposed mechanical arrays where a precise, glowing stream of liquid stretches momentarily through the vacuum between two catch-basins.
31
31
-*Absence* of protruding, vulnerable traditional fins.
@@ -38,7 +38,7 @@ In the vacuum of space, dissipating the extreme waste heat from fusion drives an
38
38
Combat in Delta-V happens over vast distances, requiring extreme projectile speeds. Ship weaponry relies on electromagnetism rather than chemical explosives to accelerate solid tungsten or depleted uranium slugs to significant fractions of light speed. Firing these weapons requires massive bursts of energy, pulling directly from the ship's capacitor banks and reactor.
39
39
40
40
**Visual Description & Image Placeholder:**
41
-
> *[IMAGE: To be generated - Close up of a spine-mounted Railgun]*
- Extremely long, heavy, spine-mounted or turreted barrels.
43
43
- Exposed magnetic coils spaced evenly along the length of the barrel.
44
44
- Flanked by incredibly thick power conduits and hazard warnings due to massive electromagnetic fields.
@@ -51,7 +51,7 @@ Combat in Delta-V happens over vast distances, requiring extreme projectile spee
51
51
To survive kinetic railgun impacts, deep space warships utilize layered defenses. The outermost layer is a **Whipple Shield**—a thin, sacrificial bumper designed to vaporize incoming high-velocity slugs upon impact. This spreads the kinetic energy over a much wider area so that the underlying, thick **Ablative Armor** can absorb and slowly slough off the remaining energy without the vital modules being penetrated.
52
52
53
53
**Visual Description & Image Placeholder:**
54
-
> *[IMAGE: To be generated - Close up of scarred ablative armor overlapping]*
- Highly utilitarian aesthetic, commonly painted in gunmetal or navy tones.
57
57
- Frequently marred with impact craters, scorch marks, and replaced modular segments.
@@ -64,7 +64,7 @@ To survive kinetic railgun impacts, deep space warships utilize layered defenses
64
64
Deep space logistics requires standardized mass optimization. Fuel (liquid hydrogen and oxygen) is stored in perfect spheres—the most efficient shape for maintaining pressure with minimal material weight. To prevent the cryogenic fuel from boiling off due to solar radiation, the tanks are wrapped in highly reflective Multi-Layer Insulation (MLI).
65
65
66
66
**Visual Description & Image Placeholder:**
67
-
> *[IMAGE: To be generated - Close up of gold-foil spherical tanks on a bare truss]*
- Clusters of perfectly spherical tanks exposed to space.
69
69
- Wrapped heavily in crinkled, highly reflective metallic silver or Kapton gold foil.
70
70
- Supported firmly by a skeletal framework of exposed, bare-metal modular trusses.
@@ -77,7 +77,7 @@ Deep space logistics requires standardized mass optimization. Fuel (liquid hydro
77
77
While massive fusion drives handle main acceleration, ships still need to pitch, yaw, roll, and perform delicate docking maneuvers over short distances in zero-g. They rely on networked clusters of small, hypergolic chemical thrusters or cold-gas jets to provide this precise rotational thrust on all axes.
78
78
79
79
**Visual Description & Image Placeholder:**
80
-
> *[IMAGE: To be generated - Close up of an RCS thruster quad block]*
- Small "quad-block" thruster nozzles protruding from the corners and extremities of the hull.
82
82
- Often feature scorch marks radiating out from the tiny bells against the plating.
83
83
- Visually emits short, sharp, pale bursts of exhaust.
@@ -90,7 +90,7 @@ While massive fusion drives handle main acceleration, ships still need to pitch,
90
90
For vessels that don't need continuous massive fusion power (like Orbital Bases) or as auxiliary power backups, enormous deployed solar panels are used to convert sunlight directly into electricity. Because sunlight significantly weakens in deep space, these arrays must be incredibly large to generate sufficient voltage for the station's needs.
91
91
92
92
**Visual Description & Image Placeholder:**
93
-
> *[IMAGE: To be generated - Close up of deploying solar panels against the void]*
- Enormous, flat, dark-blue or black rectangular grid arrays extending far from the main hull.
95
95
- Supported by delicate-looking unfolding rigid booms and trusses.
96
96
- Highly reflective, flat, and fragile appearance compared to the armored main hull.
@@ -103,7 +103,7 @@ For vessels that don't need continuous massive fusion power (like Orbital Bases)
103
103
In the vast, silent void of the solar system, communicating telemetry and targeting data requires highly focused, narrow-beam frequency transmissions. Large parabolic dish antennas are designed to pierce through background radiation to maintain contact with planetary bases or other ships at extreme ranges.
104
104
105
105
**Visual Description & Image Placeholder:**
106
-
> *[IMAGE: To be generated - Close up of a massive targeting/comms dish antenna]*
- Large parabolic dishes mounted on articulating mechanical gimbals.
108
108
- Extensive wiring and complex central receiver feeds bridging the center of the dish.
109
109
- Often clustered near the command deck or sensor booms to minimize signal delay.
@@ -116,7 +116,7 @@ In the vast, silent void of the solar system, communicating telemetry and target
116
116
Visual confirmation is useless at engagement ranges of thousands of kilometers. Ships rely on sophisticated active and passive sensor suites, including LiDAR (Light Detection and Ranging) arrays and thermal imaging, to detect enemies, debris, and navigation hazards. These are mounted on extendable booms to get them away from the electronic "noise" and radiation of their own primary fusion drives.
117
117
118
118
**Visual Description & Image Placeholder:**
119
-
> *[IMAGE: To be generated - Close up of sensor spine extending from a warship]*
- Long, fragile-looking structural spines protruding from the prow or sides of the ship.
121
121
- Tipped with irregular, geometric sensor heads, domed cameras, and flat phased-array radar panels.
122
122
- Highly detailed, asymmetrical, and purely utilitarian visual clutter.
@@ -129,7 +129,7 @@ Visual confirmation is useless at engagement ranges of thousands of kilometers.
129
129
Directly extrapolated from modern naval Close-In Weapon Systems (CIWS) like the Phalanx, PDCs are fast-tracking rotary cannons designed as a ship's last line of defense. They fire curtains of solid tungsten slugs or proximity-fused flak intended to physically shred incoming missiles and drones before they hit the hull.
130
130
131
131
**Visual Description & Image Placeholder:**
132
-
> *[IMAGE: To be generated - Close up of an articulated multi-barrel rotary cannon]*
- Mounted on extremely fast-turning spherical or pivoting gimbals scattered across the hull to provide 360-degree overlapping fields of fire.
135
135
- Thick, heavy ammunition feed tracks leading down into the ship's magazines.
@@ -142,7 +142,7 @@ Directly extrapolated from modern naval Close-In Weapon Systems (CIWS) like the
142
142
Because stealth is virtually impossible in the frozen vacuum of space (where the heat of a drive plume shines like a star against the background), combat relies heavily on sheer velocity and overwhelming numbers. Space-rated missiles are essentially autonomous drone-ships, featuring their own sophisticated hypergolic chemical or dirty fusion drives, designed to out-accelerate PDCs through swarm tactics.
143
143
144
144
**Visual Description & Image Placeholder:**
145
-
> *[IMAGE: To be generated - Close up of flush hexagonal missile launch tubes]*
0 commit comments