Login

A Ship on an Empty Sea

Quarterdeck began as a single ship on a blank sea in the browser, sailed by hand against a shifting wind.

Sailing by the wind

The first build, early in the morning, was a top-down chart with a fixed-rate physics step underneath, fifty steps a second whatever the screen is doing. Everything on screen was drawn on a plain 2D canvas, the browser's flat drawing surface, with no 3D engine at all: the sea, the ship, the buoys and the panels. A ship's speed depends on its angle to the wind, read from a polar curve, and on how much sail is set: furled, battle sail or full sail. The rudder takes time to go over and come back, the ship turns faster at speed, and a hard turn bleeds way. The wind shifts on its own every so often, and a key forces a shift for anyone who wants to practise.

The first build: a small ship seen from directly above on a dark blue grid, a wake curving behind it, the speed panel in the corner
The first build, looking straight down.

A course of numbered buoys gave the first reason to sail somewhere. It is laid out from the wind: an upwind mark, two reaching marks and a finish back at the start, so one lap sails every point of sail once. The clock runs from the start, and the best lap is kept for each hull. Time can run at one, two, four or eight times.

The chart zoomed out to show the course: the ship small at the centre and the numbered marks spread around it
The buoy course, zoomed out.

Mid-morning the sea got lighter, with faint wind ripples drifting downwind in place of the grid.

Yards and staysails

Before noon the yards were split into two groups, fore and main-with-mizzen, so they can be braced separately, with an auto-trim key for those who'd rather not. The yards brace the right way round, the windward yardarm forward. Staysails came in as well: they add speed close-hauled and fade out by a beam reach. A double-tap now latches the rudder or the yards hard over.

A view from the deck

A chase camera joined the top-down chart: from above and behind, and lagging behind the ship in a turn so the swing of the bow can be felt. The lag was tuned twice in an hour, and each time it got longer, until the camera took about ten seconds to come round. It is not 3D. The view is drawn on the same 2D canvas as the chart, with each point of the sea and the ship projected into perspective by the sim's own camera math: the horizon, the ripples, the hull and every sail are flat shapes placed where a camera would see them. A ship-up compass rose in the corner shows the hull and the angle of the yards.

The chase view from above and behind a ship under full sail in a turn, the compass rose and speed panel at the lower left
The chase camera, lagging in a turn.

Holding the mouse and dragging orbits the camera, which swings back when it's released. From the beam, the first day's ship shows what it was: a simple hull with square sails on three masts and staysails between them, each one a flat shape drawn in perspective.

The day's ship seen from the beam: a plain brown hull, square sails on three masts and triangular staysails
The first day's ship, seen from the beam.