JęzykPolski

sail.

You skipper a small cruising sloop, and the point is the passage rather than the race. Apparent wind, sail trim, heel and righting moment, leeway, the hull-speed wall, rudder stall, weather helm — modelled for real, not a wind arrow and a speed multiplier.

The end of the day
The end of the dayDawn and dusk used to be the same grey as noon: only the sunlight warmed, so the water carried a gold path under a sky with no colour in it. The gradient moves with the sun now — deep towards violet overhead, burning where the sun is, with the anti-twilight arch on the far side — and the cloud bases catch what the sea throws back up at them.

What it is

The loop is the sailing

True wind sets your trim; trim gives you drive and leeway; drive shifts the apparent wind; and you trim again. Everything else — anchoring, the auxiliary, winches, reefing — extends that loop rather than standing beside it.

Angle of attack, not wind angle

A velocity prediction program can assume optimal trim and tabulate against wind angle alone. A game cannot, because trimming is the player's job. The sheet sets the chord angle, the chord angle sets the angle of attack, and the angle of attack decides whether the sail drives, luffs, or stalls.

It teaches you to sail

The overboard drill is also the lesson: one instruction at a time, nothing until the last one has been done, and then the dan buoy goes over the side and the rest of it matters. Getting a boat going is three keys and two minutes; getting her back to one spot and stopped there is the whole of boat handling, and nobody practises it until they need it.

One boat, modelled properly

A production charter sloop of about 34 feet — the class most sailors have actually steered, and can therefore judge. One boat modelled properly beats five modelled vaguely.

582tests across the workspace
180in the dynamics alone
200 Hzfixed physics substeps
4 DOFsurge, sway, roll, yaw — with added mass

Pictures

These are the desk build, and there is a tab you can sail instead. The whole thing compiles for wasm32-unknown-unknown and the button at the top of this page opens it: the same sea, the same boat, the same model, about fifteen megabytes down the wire and a little under fifty frames a second. What the tab cannot do is sailing together — a browser has no UDP and cannot broadcast, so the relay, the list of games on the network and joining by address are the desk build's alone — and it wants a real keyboard, so a phone will have to wait.

The boat sailing in a squall, heeled over
Thirty frames of a squallShe heels, the sea runs under her, and the instruments answer — which is the half of this that a still photograph cannot say. Recorded by the game photographing itself, because screen capture wants a permission a build server does not have.

The model

Every row here is arithmetic that can be wrong in a way a sailor would notice, which is why the core carries a validation suite that asserts against figures known from the water rather than against its own output.

PartTreatment
Rigid body4 DOF — surge, sway, roll, yaw — with added mass. Heave and pitch arrive with waves.
Sail forcesHazen decomposition, with coefficients blending into flat-plate behaviour past separation
The slotEach sail bends the other's wind — the headsail downwashes the main, the main upwashes the headsail — scaled by how much of the sail doing the bending is actually set. Without that last part a main rolled up on the boom went on turning the genoa's wind by four degrees, and the boom had to be trimmed as though the main were there.
ReefingThree slabs and then she is handed: full, one, two, three, down. Each slab takes a sixth of her off, and the step from the second reef to no mainsail at all is the one you need in the forties.
Frictional resistanceITTC-57 line plus roughness allowance. Not an approximation.
Wave-making resistanceCalibrated curve shaped like the Delft series, with the hull-speed wall. The full DSYHS regression needs a dozen hull coefficients nobody publishes for a production cruiser; residuary_resistance is the seam where it drops in.
Induced resistanceClassic, with effective span below draft because of the free surface
Keel and rudderLifting-line slope with a real stall. Rudder authority goes as the square of flow speed.
StabilityGM slope blending into a GZ curve that peaks and gives way
Weather helmHeel-shifted centre of effort plus the asymmetric heeled waterplane
WindOrnstein-Uhlenbeck gusts that veer as they build, with a boundary-layer gradient. WindField is where a real GRIB2 forecast replaces it.
SeaTwenty-one Gerstner components on a Pierson-Moskowitz spectrum and deep-water dispersion, heights and periods from fetch-limited relations
Heave and pitchDistributed buoyancy over nine hull stations against the local surface
Waves on rollThe GZ curve evaluated at heel relative to the wave slope
SurfingFroude-Krylov: displacement times g times the surface slope
Added resistance in wavesCharged from the power the motion damping dissipates
IntegrationFixed 200 Hz substeps, decoupled from frame rate
Not modelled yet, and known to be absent: tide and current. The chart draws a wind-driven set and drift in its corner, two and a half per cent of the wind, and the sea's own texture is carried along by it — but the hull is not, so that arrow is the one thing on the paper the boat does not obey. Worth knowing before trusting a dead-reckoning position. Time runs 1:1 with no compression, which is a deliberate decision and one that will have to be revisited: forty miles at five knots is eight hours.

Sound

Synthesised, not sampled. There are no audio files in the repository and there do not need to be: wind and water are filtered noise, so generating them is the honest method rather than a shortcut. The rigging note comes from the Strouhal relation on a 6 mm shroud, and it is gated on how steady the wind is — vortex shedding cannot lock on to a flow that is changing underneath it, so a shroud in a gust lets go, goes quiet, and finds a new note when the gust steadies.

There is a band as well, and it is written by the boat rather than played at her. The tempo comes from the encounter period — the rate the hull actually meets the waves at — so the music is in the same rhythm as the sailing instead of across it. Beating is syncopated and square, reaching gets a walking bass, running is sparse. Past what the boat can take, it changes language entirely, into something with a flattened second in it.

Sailing together

Two to eight friends in one archipelago. Every boat is computed by the person sailing her and the server is a relay, a clock and a lobby — anything else would put a round trip between somebody's hand and their rudder, and a sailor feels fifty milliseconds on the tiller. A game on the same network is in the list, because an address read out over a chat window is wrong about a third of the time.

sail-server --seed 42

Get it

macOS

curl -fsSL https://raw.githubusercontent.com/kapoost/sail/main/dist/install.sh | sh

A line in a terminal rather than a download on purpose: macOS quarantines what a browser saves and not what curl fetches, and since macOS 15 removed right-click-Open there is otherwise no straightforward way past “Sail is damaged and can't be opened” on an application nobody has paid Apple to vouch for.

Windows

irm https://raw.githubusercontent.com/kapoost/sail/main/dist/install.ps1 | iex

Same idea: “Windows protected your PC” comes from the mark of the web, which the program doing the downloading attaches — a browser does, Invoke-WebRequest does not. Sail.exe from the releases page works too, if you would rather click More info and Run anyway.

Sail it in a tab

No install at all, if you would rather look first: the same game, built for the browser, in a tab. She starts with the watch aboard and the pilot steering, in open water, so the first minute can be spent looking — and Esc → MISSIONS → SAILING 101 walks you round her one control at a time. It needs WebGPU, and in practice that means Chrome or Edge — Safari has WebGPU and paints the whole thing black, which is the engine and the browser disagreeing rather than this game, and the page says so before it fetches anything. About fifteen megabytes down the wire, and it runs at a little under fifty frames a second against sixty on a desk. Single-handed only: a page cannot find the game your friend is running in the next room.

From source

cargo run -p sail-app --release      # the game
cargo test -p sail-core              # the validation suite
cargo run -p sail-core --release --example polar   # the speed polar

The keys

Generated from the program's own help screen — press ? or F1 in the game for the same list. It is not copied here by hand, because the one time a key list was written from memory on a download page, three of the keys were wrong.

The help screen in the game
The same list, in the programBehind a mark in the corner, which is the first thing anybody tries. The page above is generated from the source of this screen.

AT THE HELM

← →
the tiller, and it holds the angle you leave it at
Space
centre the helm, and put the view back where it looks
Shift
fine — hold it with anything for a smaller bite
P
autopilot on and off
O
and whether it steers a compass course or a wind angle
, .
move its target ten degrees — one with Shift
 
with it engaged, Space is the view only: the pilot has the helm

THE SAILS

W S
mainsheet: haul in, ease
Q E
genoa winch: ease, grind in
1 2
pick a line out of the clutch bank
A D
and work the one you picked
X Z
order a headsail: genoa, code 0, gennaker, spinnaker — the foredeck rolls the old one away, bends the new one on and sets it
T
a hand on the sheet: once for the sail that leads
shift T
call the watch on deck, or stand them down — they sail her while you steer, and a hand on any rope takes it back
 
press again for the other — main first upwind, headsail off it
G
back the genoa — the only sail that can be, and the way out of irons
F
the preventer: rig it for a long run, take it off before you gybe

WHEN IT BLOWS

R
dump: once eases until the deck is steady and the pilot can hold her
 
again, or held, lets everything go — cloth flogging, and she stops
1 2 A D
the reef and the furling line are lines in the bank

WHERE YOU ARE

Shift B
the glasses, which name the place rather than the thing
B
and ask whether what is in them is enough: a mark near enough to read names itself, and three well spread name the coast
Shift N
the hand bearing compass; aim with the right button held
N
and shoot: hold the notch on it, and it says whether it caught
 
one instrument at a time, and either one puts you in the cockpit
M
the chart in the corner, and [ ] to zoom it
Shift M
spread on the table: dividers, ruler, parallel rule, protractor, pencil, watch, log, rubber, and the fix
 
bearings and what you have made out go in the DECK LOG; click a line there to lay it on the chart, and again to take it off
 
right-drag moves the paper — lost, it does not follow you about
 
the log writes itself up while it is spread: tack, stay on deck, and the pencil runs on the old course until you come back to the table
L
stream the log and read it: a minute of glass, and the bar says when to stop her
Shift Backspace
somewhere at sea with the sails set and no idea where — it throws the passage away, which is why it is nowhere near the keys you sail with
F12
a picture of the screen, into your Pictures folder — the fault you cannot describe is the one nobody fixes

STOPPING FOR THE NIGHT

V
let go, and veer five to one on the water under her — press it again to weigh
 
the chart draws the anchor and the circle she can swing in: inside it is lying to it, outside it is dragging
 
the windlass lifts chain, not a boat — if the cable is bar taut, sail up to it and take in the slack as it comes

IF SOMEBODY GOES IN

Enter
throw the lifebuoy — and the throw is the part that cannot be late
 
the same key alongside: the boathook reaches by itself, and the catch is timed to the sea — take it as she comes level
Esc
then MISSIONS practises the whole thing on Oscar

THE ROD, AND THE SCREEN

J
the rod over the stern — and the lift, with one alongside
↑ ↓
the reel: wind in, give line — and line out is depth
- =
the drag: a third of the line's strength is the rule
Shift
low gear: slower, and it winds when high gear will not
U
pump: lift the rod, and wind as you let it down
I
what swims here, how to troll for it, and what you have had
C
view: behind her, ahead, down the wake, under it
H
hide the console
K
mute
3 - 7
the signal halyard, while there is a ship to talk to: K ask, L stop, X wait, P carry on, U danger — and 0 hauls it down
F11
full screen, and back — Alt Enter does it too
Esc
settings — sound, picture, weather, the passage, together, drill

The polar

Boat speed in knots, by true wind angle and true wind speed — generated by the simulation rather than drawn. Best upwind VMG in twelve knots lands at 40 degrees true: 5.6 knots through the water, 4.1 made good, 21 degrees of heel, 3.6 of leeway. Those are the numbers off a real boat.

charter sloop 34 — LWL 9.20 m, disp 5500 kg, sail area 64 m2, hull speed 7.36 kn
reefed to hold heel at or below 22 deg; * marks a point that did not converge

  TWA       6kn       8kn      12kn      16kn      20kn      25kn     <- boat speed, kn
   30     1.20*     1.56*     2.74      3.10      2.87*     2.91*
   35     2.35      3.42      4.90      5.03      4.89      5.18 
   40     3.22      4.28      5.65      5.84      5.62      6.21 
   45     3.78      4.63      5.89      6.29      6.10      6.57 
   50     3.98      4.78      6.20      6.53      6.65      6.82 
   60     4.29      5.22      6.54      6.94      6.95      7.15 
   70     4.53      5.48      6.71      7.27      7.41      7.36 
   80     4.64      5.60      6.78      7.40      7.71      7.80 
   90     4.63      5.60      6.79      7.43      7.89      8.10 
  110     4.35      5.30      6.64      7.32      7.80      8.27 
  120     4.10      5.03      6.46      7.19      7.68      8.15 
  135     3.64      4.53      6.00      6.82      7.36      7.84 
  150     2.98      3.78      5.15      6.26      6.92      7.49 
  165     2.63      3.39      4.72      5.86      6.67      7.31 
  180     2.34      3.04      4.28      5.35      6.26      6.96