Playing
The boat
A procedural fishing boat moored at the end of the pier. It floats on NatureGL Water's buoyancy, leaves a wake, and has a working wheelhouse with a live chart plotter and radar.
boat-chase scenario with the throttle held open and a turn to port. The hull pitches and rolls on the FFT swell through NatureGL Water's buoyancy.#Boarding and leaving
#Get close
The boat is moored on the east side of the pier head. Walk (or swim) to within 7.5 m of it. The prompt changes to E Board boat.
#Board
Press E. The camera blends into the cockpit over 0.9 s and the HUD shows the boat instruments.
#Leave
Press E again. If the boat is alongside the pier head you step onto the deck; anywhere else you step into the water 3.2 m off the side and start swimming.
#Driving
| Input | Action |
|---|---|
| W / S (held) | Throttle up / down at 70% per second, from −35% (reverse) to 100% |
| A / D | Rudder to port / starboard; it centres when you let go |
| X | Throttle to zero |
| V | Cockpit ↔ chase camera |
| Mouse | Look around |
- Top speed is 13 m/s (about 25 knots) at full throttle, and 3.85 m/s in full reverse. The hull takes a few seconds to get up to speed.
- Steering needs way on: the rudder has full effect above 4 m/s and none when the boat is stopped.
- Collisions: five probes round the hull test the terrain and the pier. If one hits land shallower than 0.85 m below sea level, or the pier, the boat bounces back at a quarter of its speed and the throttle drops.
#Cameras
Cockpit puts you at the helm, looking out through the raked three-pane windscreen. Look around to see the wheel, the throttle, the compass binnacle, the gauges and the two screens.
Chase follows 17 m behind and 5.5 m above the hull, never lower than 1.5 m above the water. Move the mouse up and down to raise or lower it.
#Instruments
The boat HUD (bottom left) shows:
- a throttle bar, turning orange in reverse, with the percentage under it;
- a speed dial in knots, full scale at 30;
- a compass with the heading in degrees and the cardinal point.
Inside the wheelhouse the chart plotter and radar are canvas textures drawn live from the boat's position (src/world/boat.js).
#Buoyancy and wake
The game registers the hull once with NatureGL Water and lets the library move it:
this.boatHandle = this.water.buoyancy.addObject(this.boat.group, {
size: { length: BOAT_DIM.length * 0.8, beam: BOAT_DIM.beam },
draft: BOAT_DIM.draft,
heightSmoothing: 2.2,
});
this.water.addWake(this.boat.group, { length: BOAT_DIM.length, beam: BOAT_DIM.beam });The boat controller only sets the heading and the horizontal position. water.update() then applies the heave, pitch and roll, which is why the boat camera pose is computed after water.update() in the frame order.