How the Harmonic Tide Engine Works

Tidewright - maritime civil engineering hydraulic lock visualization schematic
Fig 1. Rotating brass constituent gears model Lord Kelvin's harmonic tide prediction engine, lifting cargo pearls over lock sills into destination quays.

Tidewright is a maritime physics puzzle founded upon Lord Kelvin's famous mechanical tide-predicting machines from the Victorian era. In actual coastal canal networks, the ocean tide does not follow a solitary simple wave. Instead, tidal height represents the physical sum of multiple astronomical harmonics—the primary semi-diurnal lunar constituent, the principal solar constituent, and shallow-water overtone resonances. Each harmonic is represented mechanically inside your engine room by a polished brass gear driving an eccentric crank pin.

As these constituent gears rotate together, their individual vertical displacements are summed through a flexible cable assembly, continuously driving the simulated water height across your harbor chambers. Your puzzle objective is floating luminous cargo pearls out of lower entry berths, lifting them cleanly over dividing stone barrier sills, and docking them safely into target quays. Sills only submerge when water levels reach precise buoyant clearance thresholds. If water is too low, the pearl collides with the stone barrier; if water rises excessively high, protective emergency sluices trigger and lock the canal. You must configure starting gear phase angles so the combined harmonic wave crests and troughs with surgical precision.

Harmonic Gear & Basin Controls

Configure your mechanical tide machine and manage canal flow using straightforward mouse dragging and keyboard shortcuts:

  • Click / Drag Gear Cranks: Click and rotate any brass constituent gear to adjust its starting phase angle. An on-screen phase angle indicator displays your current mechanical offset.
  • Spacebar: Starts the tidal release simulation, validates cargo delivery when pearls enter target quays, or advances to subsequent canal networks.
  • R: Resets the water level and returns all constituent gears to their default starting orientations for the level.
Harbor Lockmaster Control Reference
Action Input Mechanism Mechanical Tide Effect
Tune Gear Phase Left Click + Drag Shifts constituent sine wave timing across the harbor basin.
Run / Advance Space Launches tide flow or advances to subsequent canal stage.
Reset Machine R Clears current harmonic run back to initial basin state.

How to Clear Lock 4 (Taming The Beat Frequency)

Lock 4 presents a tricky mechanical challenge: two dominant constituent gears operate at nearly identical rotational speeds, generating a pronounced physical beat frequency. Beginner lockmasters frequently make the mistake of aligning both crank pins straight upward, assuming that a towering spring tide surge will carry the cargo pearl directly into the elevated quay. However, when both harmonics achieve simultaneous crest alignment, the water column rises above the safety threshold, triggering emergency sluice gates that instantly strand the cargo pearl.

The reliable solution is introducing a deliberate phase offset between the two gears. Rotate the primary lunar gear approximately 45 degrees clockwise while leaving the secondary solar gear angled slightly backward from the vertical axis. This prevents the two wave peaks from stacking violently on top of one another. Instead, their interference creates a broadened, intermediate high-water plateau that stays safely beneath the emergency flood limit while granting ample float time for the pearl to drift across the stone sill.

Harbor Routes for Harder Levels

Later stages introduce multi-chamber locks, dual cargo pearls, and challenging neap tide restrictions that demand refined harmonic timing:

  • Diurnal Shift (Level 3): Features daily wave asymmetry where one tidal cycle is significantly shallower than the companion crest. Use the small diurnal gear to amplify the second wave to ensure delivery.
  • Neap Lock (Level 5): The overall water displacement budget is strictly constrained. You must achieve precise constructive interference between all active gears; a misalignment of even twenty degrees leaves pearls stranded on the sill.
  • The Spring Run (Level 6): Coordinates twin cargo pearls starting in separate chambers. Tune the brass gears to generate an alternating double-crest: the first wave floats Pearl A into the intermediate canal, while the trailing overtone harmonic carries Pearl B home.

Tidal Prediction & Cargo FAQ

Why did my cargo pearl get trapped on top of the canal sill?

The water dropped before your pearl cleared the gate threshold. Adjust the phase angle of the slower harmonic gear to widen the high-tide window, keeping water buoyant long enough for the pearl to float across.

How do the different gear sizes affect water movement?

Larger gears represent primary long-period tidal waves with massive water displacement, while smaller gears provide rapid, subtle secondary modulations that fine-tune peak timing and shelf duration.

Can I rotate gears while water is actively flowing?

No, gears lock in place the moment the tide cycle begins. You configure the mechanical phase parameters prior to release, observing fluid behavior to refine gear alignments on subsequent attempts.

Built with pure vanilla HTML5 canvas and standard Web Audio (no external engines or heavy libraries).