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.

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.
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.
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.
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.
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.










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.
| Part | Treatment |
|---|---|
| Rigid body | 4 DOF — surge, sway, roll, yaw — with added mass. Heave and pitch arrive with waves. |
| Sail forces | Hazen decomposition, with coefficients blending into flat-plate behaviour past separation |
| The slot | Each 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. |
| Reefing | Three 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 resistance | ITTC-57 line plus roughness allowance. Not an approximation. |
| Wave-making resistance | Calibrated 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 resistance | Classic, with effective span below draft because of the free surface |
| Keel and rudder | Lifting-line slope with a real stall. Rudder authority goes as the square of flow speed. |
| Stability | GM slope blending into a GZ curve that peaks and gives way |
| Weather helm | Heel-shifted centre of effort plus the asymmetric heeled waterplane |
| Wind | Ornstein-Uhlenbeck gusts that veer as they build, with a boundary-layer gradient. WindField is where a real GRIB2 forecast replaces it. |
| Sea | Twenty-one Gerstner components on a Pierson-Moskowitz spectrum and deep-water dispersion, heights and periods from fetch-limited relations |
| Heave and pitch | Distributed buoyancy over nine hull stations against the local surface |
| Waves on roll | The GZ curve evaluated at heel relative to the wave slope |
| Surfing | Froude-Krylov: displacement times g times the surface slope |
| Added resistance in waves | Charged from the power the motion damping dissipates |
| Integration | Fixed 200 Hz substeps, decoupled from frame rate |
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.
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
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.
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.
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.
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
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.

AT THE HELM
THE SAILS
WHEN IT BLOWS
WHERE YOU ARE
STOPPING FOR THE NIGHT
IF SOMEBODY GOES IN
THE ROD, AND THE SCREEN
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