Halden Industrial Group / Autonomous salvage terminal
You run the ship. The drone runs itself.
WARD/EN is a programming and salvage game. A drone enters a wreck
with no one at the controls, follows the directive you wrote, and
sends back only what its uplink can carry. You never steer it live.
You write a better plan, and later a crew of drones that talk to
each other.
A directive is a small project of .warden files: a
plan in main.warden and the library modules it
includes. Route planning, contact response, sensing and the
recovery routine are all ordinary source, and every line is yours
to change.
Dispatch
No one at the controls
Dispatch freezes the directive. From that moment the drone acts on
its own inside a wreck you only know from a recovered schematic,
with a battery that is the clock and something patrolling the
corridors. A fleet is several drones acting on their own at once,
each on its directive, talking over a link the wreck can cut.
Read
What came back
Cargo in the hold, the report, and the map you now hold of that
wreck. A drone that ran dry stays inside. Improving the directive
is how you survive; the salvage operation determines what you can
risk next.
The WARD/EN language
02 / Directives are source
main.wardenlanguage 2;
include"lib/recovery.warden";
enumOrder { core_first, recorder_first }
fnsearch(target: site, item: string): boolean {
let result = move_to(target, Style.quick, defend);
if (result != MoveResult.ARRIVED) { return false; }
scan();
if (observed_item(item) == null) { return false; }
collect(item);
return true;
}
on start {
let seen = observe();
let sites = [seen.sites.POWER, seen.sites.COMMS];
let i = 0;
while (i < len(sites)) {
if (search(sites[i], "NAV_CORE")) { break; }
// A core you cannot bring home is worth nothing.if (observe().energy < reserve_for_home() + 40) { break; }
i = i + 1;
}
log(observe().energy);
return_home(Style.quick);
}
A small imperative language with the shape you expect and nothing
you have to guess at. The hardware is a handful of calls that each
cost a tick and report a Result; everything above
them, including move_to and its route planner, is
library code you can read, edit and replace.
The briefingobserve().mission is the contract the ship sends
with the drone: objectives, priorities and the housings that
may hold each item. A plan that reads it flies on any
wreck.
FunctionsParameters, return values and optional type annotations the
editor checks and shows on hover.
EnumsDeclare the values a function accepts. A wrong literal is
refused before dispatch; the editor offers the members.
CrewsFly wings beside the lead and let them talk:
send costs a tick per 32 bytes on a fitted
transceiver, receive reads the inbox, and the
ship holds a message for a drone out of range. A scout
reports; a hauler acts on it.
CallbacksPass a function to move_to and decide, step by
step, what a contact means: continue, act, or abort.
ModulesSplit a directive across files with include. The
modules are one library per operation: improve a routine once
and every directive that includes it has it.
Pure functionsPlanners are declared pure; the controller
refuses any hardware call inside them.
ReferenceEvery keyword, hardware call, the
observe() record, the shipped library and the
controller's limits on one page:
the language reference, also
as a PDF for printing.
ToolingCompletion, hover, go-to-definition, references, rename and
diagnostics against the drone's actual fit, in the game's
Workbench or in VS Code through the WARD/EN extension and
language server.
Debug it before you risk it
02b / The test bench
Workbench / Test bench / Clear deck, core at POWERPaused / lib/recovery.warden / objectives()
A directive used to be tested by flying it. The test bench flies
it for you, on a handful of prebuilt scenarios, inside the
Workbench: clear decks, a roamer on patrol, a survey through a
closed door, the training wreck as briefed. The scenarios are
pinned, so a plan that fails, fails for a reason you can name.
BreakpointsClick the gutter or press F9, in your plan or deep in a
library module. A breakpoint on a comment snaps to the next
statement.
SteppingThe toolbar every debugger shares: continue, step over, step
into, step out, restart, stop. Step into a library call and
the file opens at the stopped line.
StateThe call stack, each frame's locals, and the drone's
position, energy, cargo and last hardware result while it
waits. Hover a name to see its value in the frame.
TimeTick advances one tick of world time. Play runs at the
mission's own clock and stops at a breakpoint, so you can
watch the walk and the map fill in.
HonestA stopped flight, resumed, ends byte-identical to the same
dispatch run straight through. The bench never touches a
dispatched drone; while one is out, it is offline.
HistoryEvery finished run is kept with the library revision it flew
on, so a change to a shared routine can be judged against the
last flights of every plan that uses it.
Six stations, one meaning each
03 / The loop
01Navigation
The sector chart: wrecks, contracts, regions and the intelligence
you have bought. Travel and dispatch commit strategic time;
reading the chart is free.
02Drone Bay
Fit, service and buy equipment. What is installed decides which
calls a directive may make, how long a step takes and how much
energy a sweep draws.
LIBWorkbench
The editor, the operation's shared library and the test bench.
Save a directive, assign it to a drone in the bay, and it is the
exact program that flies; dispatch keeps its own frozen copy,
whatever you change afterwards.
04Debrief
Settlements, cargo, reports and the wreck record you carry
forward. Return to a wreck and the drone starts from what the last
one learned.
05Ship
Systems, licences, analysis and upkeep. Industrial regions need
the extended drive and a licence; the deep recovery contract needs
everything.
02Training berth
A tutorial that flies the loop with a guide, and a fifteen-lesson
language course, each lesson a real expedition on the training
wreck. Nothing there is saved but your progress.
Write it where you like
03b / External editing
In the game
The Workbench
A full source editor under the CRT glass, or in high-contrast
clear coding: file switcher, completion, hover, go-to-definition,
references, rename and diagnostics against the fitted drone.
In VS Code
The WARD/EN extension
Export a directive and it unpacks into a folder of
.warden files plus a warden.json that
carries the fit and the wreck's site names. The extension gives
you the same completion, navigation, rename and semantic
highlighting in your own editor; pack it and import it back.
Anywhere else
The language server
A dependency-free language server speaks LSP over stdio and is the
game's own language service, so diagnostics never disagree with
the Workbench. Neovim, Zed, Helix: point them at the command and
edit.
The ship sees only what the uplink carries
04 / Telemetry
The simulation keeps its own truth: creatures, hidden geometry and
intent are private. The Mission station shows the received packet,
and so does your directive. A detector sweep pings a body where it
was when the sweep crossed it; a scan confirms what the schematic
only claimed; a corridor behind machinery thins the signal until
the feed drops.
When a carrier drops inside coverage you get a terminal burst and
a last position. Outside it you get nothing, and the debrief says
so. Recovered drones bring back their hardware, never their
onboard buffer.
T0040D01DOOR OPENED / 13, 5 / LOCAL SCAN UPDATED
T0058D01POWER / HOUSING EMPTY / LOCALLY OBSERVED
T0058D01LOG / POWER is empty, trying COMMS
T0091D01MOTION ACQUIRED / R 4.2 / 274°T0094D01Defence discharge / range 2.8 / bearing 271° / ammo 2.
T0096D01REPLANNING / ROUTE UPDATED
T0141D01OBJECTIVE ACQUIRED / NAV_CORE
T0203LINKUPLINK INTERRUPTED / MACHINERY SHIELDINGT0231D01EXTRACT / OK / ENERGY 21.06
T0231D01NAV CORE recovered. Drone extracted.
From one line to a recovery policy
05 / Training
The language course is fifteen lessons, each a pinned expedition on
the training wreck. The starter always flies and always misses the
goal; the verdict comes from what actually came back, and a hint or
the reference solution is one press away. Take them in order, or open
any lesson you like.
Basics
01
First directiveon start, statements, hardware calls, the log
02
Calling the libraryinclude, library routines, enum arguments
03
Results and decisionslet, return values, if, MoveResult
04
Nothing therenull, else, coping with being wrong
05
Loops and arrayswhile, arrays, len, break
Structure
06
Functionsfn, parameters, return, annotations
07
Your own modulefiles and include paths
08
Enums and typesdeclared values, compile-time checks
09
The hardware beneathstep, open, cell; no library at all
Field craft
10
Callbacks and threatsfunctions as values, the response contract
11
The energy budgetobserve().energy, reserve_for_home
12
The briefingobserve().mission, plans that read the contract
13
Pure functions and routesplan_route, editing the library itself
14
Talking to the crewsend, receive, a scout that reports
15
Capstone: Recovery 01write recover yourself
Requirements
06 / Terminal
Steam, eventually
WARD/EN is a PC game and will ship on Steam. Until then the
early test build runs in a desktop browser window: it scales to
your screen and is not designed for phones.
WebGPU, ideally
The display is a real WebGPU compositor: phosphor persistence,
bloom, scanlines and grain in one pass. Current Chrome and Edge
have it on by default. Without it the terminal falls back to a
CSS display and plays exactly the same.
Nothing else
No account and no server. Operations are saved in your browser's
storage and export as JSON backups you can carry between
machines; keep one before a browser clean-up, since the test
build has no cloud.
Directives are plain text. Export one from the Workbench and it
carries the fit and the wreck's site names, so the VS Code
extension and the language server see exactly what the game sees.
Edit in either place, test it on the bench; the dispatched copy is
always the one you saved.
Losses are real in an operation: a stranded drone and its modules
stay in the wreck until recovered. The training berth costs
nothing and saves nothing but your course progress.
Salvage Operations Control
Open the terminal.
The early test build is open now, in your browser. Start with the
tutorial, fly the training wreck, and write your first directive. The
Steam release follows.