Logs / Route 011

The storm comes from upwind

How the weather on Hachijō works. Fields that drift, fronts on a timetable, road water measured in millimetres, gusts that come from a clock, fog that comes from the dew point, and lightning that has to find the ground first. Also the five months when storms made no sound at all.

·11 min read·8 sections

Lightning near Okago, at night

The first weather in this project arrived on 4 January, when it was still a shooter. There were four kinds (clear, rain, snow and storm) that faded in and out, nothing changed on its own in single player, and lightning struck somewhere between 20 and 60 m from the player. Its replacement started on 12 June, and 13 June alone has 48 commits to the weather code.

This is how it works now. (The clouds are halfway through a rebuild, so they sit this one out.)

Numbers, not labels

There’s no switch anywhere that says “raining”. The weather is a handful of numbers for the whole island: cloud cover, rain, fog, wind speed and direction, storm energy, and the dew point, which is the one that holds the moisture. Each of them drifts towards a target at its own pace. Cloud cover takes two minutes to go from nothing to full, rain 45 seconds. The name you see is worked out from the numbers afterwards: a storm when the rain is heavy and there’s energy in it, rain above a quarter of the scale, drizzle below that, then fog, overcast, partly cloudy or clear.

Whether falling water arrives as rain, sleet or snow depends on the wet-bulb temperature. Hachijō’s climate is pinned to August, taken from the Japan Meteorological Agency’s normals for the island (24.3 °C before dawn, 29.6 °C in the afternoon, 87% humidity), so it always comes down as rain. Snow exists in the game. It just can’t happen here, and forcing it from the admin panel gets you snow that falls through air at 16 to 22 °C and never settles.

Temperature is one of the few things that changes from place to place. It drops 6.5 °C for every kilometre of height, so the top of Hachijō-Fuji runs about 5.6 °C cooler than the harbour.

Fronts on a timetable

Between fronts the weather drifts. Every one to three game hours it rolls a new calm: some cloud (never more than half cover), no rain, a breeze between 0.3 and 4 m/s, and a 30% chance the wind swings round. Every 8 to 20 game hours a front arrives instead, picked by weight from a short table: a shower, a rain front, a thunderstorm, a gale, or a long overcast slog. Each one runs through approach, build, peak, tail and clearing, with every phase lasting a rolled number of hours.

On Hachijō a shower is the most likely front, at 30%. Thunderstorms come in at 15%, rising to 26% between noon and six in the evening, when the table doubles their weight for afternoon convection. None of this is saved yet: every launch starts the weather from a fresh random seed.

Fronts don’t travel. A front is something that happens to the whole island at once, a change over time rather than a system crossing the map.

The gale is the newest entry, from 19 August. Its commit sets out the problem: “The strongest sustained wind anything could command was the thunderstorm’s opening 8 m/s, and only while it rained”. That meant, in the same commit’s words, “an island map could never have a big-sea day.” A gale peaks at 12 to 16 m/s for one and a half to three hours, with a little rain only on its way out.

A wet road has a depth

Until 14 August, rain was a flood. The fix describes it: “Any sustained rain capped every car at 80-100 km/h with the wheels spinning. Two independent wet models were multiplying, and one of them fed itself.” It went unseen because, as the same commit notes, “every historical rig number is a DRY number”.

Now a road carries two separate things. The first is the film, how wet the surface is. Heavy rain soaks a road in about 12 seconds, and drying speeds up with heat: a soaked road takes about two minutes to dry at 20 °C and about one on a Hachijō afternoon. A fully wet film costs 22% of grip on tarmac, at any speed. Off-road surfaces don’t take that penalty.

The second is standing water, in millimetres, and it’s the only thing that makes a tyre aquaplane. Rain fills it towards a level that grows with the square of the rain rate, and it drains faster the deeper it gets. A shower leaves well under a millimetre, a rain front 1 to 2.25 mm, and the peak of a thunderstorm up to 4 mm. From a dry road, the heaviest rain takes about 11 minutes to reach 3 mm. The top of the rain scale is 50 mm an hour, which the code describes as “a cloudburst, not ordinary heavy rain”.

Each tyre clears a certain depth through its tread: 3 mm for the common street tyre, 7 mm for a mud-terrain, nothing at all for a slick. A worn tyre clears less. Past its depth a tyre starts to float, from a speed that depends on its pressure, and a new street tyre in a cloudburst bottoms out at about half its dry grip from around 115 km/h. When the fix went in, a test car did 278 km/h dry and 277 in a 4 mm flood. Refitted with track slicks, the same car in the same flood never reached 100 and topped out at 64.

The puddles you can see follow the film. They gather in ruts and gutters once a road is properly wet, the crown dries first, and the wheel tracks hold water longest. Tyres throw spray off a wet road from about 7 km/h. On 12 September wet tyres got their own voice (a hiss that rises with speed, a tacky crackle at a crawl, a slosh in deep water, and a squeal 10 dB quieter), because, as the commit put it, “A tyre on a wet road is a different sound, not a quieter one.” Inside a car the rain drops to a muffled roar with a clatter on the roof. There are no wipers yet. No car has a wiper to move.

Gusts from a clock

The island has one mean wind. Gusts come from three sine waves of the game clock at speeds that never line up, which looks random but isn’t, so that players sharing a session gust together without any of it going over the network. In a strong wind the speed swings between 0.4 and 1.6 times the mean and the direction by up to 31°. In a calm it barely moves.

Higher up the wind is stronger and turns: 1.35 times the ground value at 100 m, 1.62 at 400 m, veered by 17°. Hills bend it as well. A slope facing a 10 m/s wind gets 4 to 5 m/s of lift on a 25 to 30° face, and the lee side gets sink and turbulence. The first version made the two exact mirror images, so down the lee of a 700 m ridge in 12 m/s it pulled air down at 9.8 m/s. The fix came with a line about the test that should have caught it: “The unit test asserting lift and sink were exact mirrors was asserting the bug.”

Planes and helicopters fly through all of that, gusts, height and hills included. Cars get a crosswind from the mean wind: about 350 N on a small car at 16 m/s, enough to push a tall van sideways at 0.72 m/s². The grass, the trees and the rain lean with it (the rain up to about 35° from vertical), and the plume over Hachijō-Fuji bends up to 350 m downwind. The sea builds with the wind too, to about 1.6 m of wave height at 8 m/s and 3.5 m at 12. What that looks like since this week is in the late-September log.

Fog is a temperature

Fog forms when air cools to its dew point, and that’s how the game makes it. The fog code’s own header sums it up: “fog is not ‘humidity went up’, it is air reaching its DEW POINT.” It looks at the lowest ground near the player, where cold air drains to, and checks the four ways fog can form there: on a clear, still night as the ground cools; over the sea when moist air comes in on a breeze; off a wet road after dark; and when you drive up into the cloud itself. The layer is up to 45 m deep and follows the terrain, so every valley fills to its own depth and the peaks stand clear.

It’s drawn as a volume across the whole world rather than a flat haze, so headlights light it up. That took a few goes. One version, on 29 July, shipped a density that was “opaque by 5 m”. At night it came out as “a 98%-absorbing soot”, and “Headlights were swallowed rather than caught.” A week later fog would only show over the sea, which turned out to be a floor set below the ground: “Fog visible ONLY over water is the signature of a lid below the terrain.”

Headlights in forest fog, in an August build

Then, on 10 September, it was switched off. Fog no longer forms on its own, after a report that it “appears on its own a while after the temperature changes”. The model is all still there and can be switched back on live. For now fog comes from the fog preset, or as a haze on the back of a rain front.

Low sun through fog in the trees, in an August build

Lightning has to find the ground

Lightning needs storm energy and real rain together. The storm cell forms upwind, about 4 km out, lives three to six minutes and drifts with the wind, so a storm arrives, passes over and moves off, and the thunder gets nearer and then farther away. The harder the storm, the closer the cell is pulled in, down to 800 m. Strikes come as often as every few seconds in a strong storm, and less often when it’s weak or far off, scattered around the cell.

About two thirds of them stay in the cloud, following the comment in the code that “Real storms run ~2-3 IC per CG”, two or three in-cloud flashes to every one that reaches the ground. Those show as a dim glow at the cloud base and a rumble. The rest come down. Each bolt grows from a random seed: a jagged main channel, one to three branches off it, and branches off those. It’s drawn in the same order a real one happens, a faint stepped leader feeling its way down for 90 ms, the return stroke at full brightness for 60 ms, sometimes a restrike, then a fade over most of a second.

Strikes used to aim at sea level, which “buried bolts below mountain roads”. Each one now finds the actual ground. Where it lands there’s a flash, a shower of sparks and a scorch mark that fades after about 20 seconds. There’s no damage and nothing catches fire. Within 300 m, the camera shakes.

The flash lights the world from the direction of the strike, fainter with distance, and it’s kept out of the sky dome on purpose. In July it wasn’t: “Entering the world through the main menu rendered a bright night sky with two suns”.

The same view as the cover, 19 seconds later

Thunder at 343 metres a second

Storms made no sound for their first five months. The thunder system had its audio wiring from the start, but, as the fix on 13 June put it, “lightning rendered a flash + bolt with no thunder. No thunder assets existed either.” The answer was to synthesise it, and that’s still how it works. Every clap is shaped noise with a crack at the front and a rolling tail, 2.2 seconds long close up and 11 seconds far away. None of it is a recording.

The same day turned up two more. The gap between flash and bang was random, 0.3 to 2.5 seconds, “while strikes sat an absurd 20-60m away (you’d be dead)”. Moving the strikes out to between 150 m and 3 km fixed that and silenced every one of them, because the sound player gave up at 100 m. Now the thunder waits for the distance divided by 343 m/s, so a strike 3 km away is heard about 9 seconds after it’s seen, and it gets quieter and duller the further off it is. Inside a car it drops below 700 Hz, to “the deep bass that actually penetrates a car body”.

In July a storm at full strength was nearly silent too. The cell needed three to seven minutes to drift close enough to hear, and until then there were only “sparse -16 dB far rumbles” under the rain. A stronger storm now pulls its cell in: at full strength it’s 950 m away within five seconds.

Everyone in the same storm

In multiplayer the host runs the weather and sends it every 5 seconds, and at once when a front starts or changes phase. Lightning is cheaper than it looks: the host sends where a strike lands and a seed, every player grows the same bolt from that seed, and each works out their own flash direction, delay and loudness from where they’re standing. A player who joins late gets the weather snapped into place. Before that, they got to watch the default sky “morph into the host’s over 2–4.5 minutes”.

The wind has gone wrong in the same way three times. The weather stores its direction as a flat vector, and each time something new read it on the wrong axis, it blew 90° off what was on screen. First the rain and snow in June, then the tyre spray and the crosswind on cars in July (“felt wind is no longer 90 deg off screen”), and finally the storm cell, on 25 September.

Filed under weather, deep-dive, hachijo-jima

Photo mode1 / 1