## What's new in 1.6.11
- **The four clips from `game/audio` and `generated/audio` sit where an install puts them.** 1.6.10 installed the light and heavy rain beds, the roof rain and the close thunder into Cloudburst's world one folder flatter than their own worlds keep them, and `audio.module` named them by that flatter path. A fresh install places them under their own worlds' folders (`deps/<world>/game/audio/rain.soundClip`, `deps/4e897ccd-.../generated/audio/...`), so 1.6.11 installs them there in this world too and `audio.module` names them by those paths. The clips are the same assets from the same worlds; the two `storm_thunder` clips were already in place.
## What's new in 1.6.10
- **The sounds are used from their own worlds again.** 1.6.9 copied the six clips into the package; they are now real dependencies on the original assets, installed under `deps/<their world>/` like any other dependency (1.6.11 puts four of them in their worlds' own folders), so a world that installs Cloudburst receives each clip from where it was made:
- light rain bed: `rain.soundClip` (asset `51cdb7cb-1d17-4b7d-b373-e5d0befd0128`, world `6b3d163f-984f-4a08-8c1d-17f79540e5c5`)
- heavy rain bed: `rain.soundClip` (asset `2f4a40c8-d5d4-44e5-8a1c-2a46d2ef6796`, world `72fc9f0a-4b7f-4af3-a599-0f41906a93b1`)
- rain on the roof: `heavy_steady_rain_falling_on_slate_roof.soundClip` (asset `475cf171-e805-4ba7-99ca-10b8af3b7b56`, world `4e897ccd-6e6c-4120-8b90-1d59231cbd56`)
- close thunder: `a_single_heavy_thunderclap_cracking_then.soundClip` (asset `ae746446-d509-4f72-8ba6-d1956d2465dd`, world `4e897ccd-6e6c-4120-8b90-1d59231cbd56`)
- mid thunder: `storm_thunder_1.soundClip` (asset `7879550e-53a2-46c6-a3e1-ad7148d778d4`, world `0fc7535e-6bb5-4849-8a08-9ba159320b28`)
- far thunder: `storm_thunder_2.soundClip` (asset `a92d50c6-de83-4af8-94aa-7d2a7e8a8113`, world `0fc7535e-6bb5-4849-8a08-9ba159320b28`)
- `cloudburst.package/audio/` (the 1.6.9 copies) is gone and `audio.module` names the originals. Nothing changes in how the weather sounds.
## What's new in 1.6.9
- **The sounds come with the package.** Cloudburst's six clips (light and heavy rain beds, rain on the roof, and the close, mid and far thunder) were held in this world as installs of other worlds' sound clips, so a release carried only install records for them, and a world that installed Cloudburst could end up without the clips or the audio module (`module '~.audio' not found`, or a push refused for a missing `rain.soundClip.pull`). They are now Cloudburst's own assets under `audio/`, with the same names, paths, sources and settings, and `audio.module` records them as the package's own. Installing Cloudburst brings every sound it plays; nothing else changes in the weather.
# Cloudburst: rain, snow, storms and fog for your game
**Weather that reads as weather.** Not white lines on the screen: soft, see-through drops lit by
your sky, your sun and your street lamps. They glint against a dark doorway and go darker against
a bright sky, streak with their speed and with your own movement, crowd thick around you and turn
into grey curtains down the lane before they fade into the fog.
The world answers the rain. Drops splash on the street and on the roofs, ring the pond and the
puddles, drip from the eaves and the branches. The ground darkens and shines as hard as it rains,
and under a roof it stays bone dry. Snow tumbles down and settles on everything that faces up,
hail bounces, sleet falls as neither. Wind leans all of it and gusts come and go. Fog lies in
banks in the low ground. Lightning lights the street without blinding anyone, and the thunder
arrives later the further away the strike was. Step inside and the rain sounds duller.
Every player sees the same weather at the same moment: the same strike, the same change from
clear to storm and back, including someone who joins in the middle of it.
## Make it rain in two minutes
1. Install **Cloudburst** from ZeroMind into your world.
2. Add the weather to your scene, in `build.luau` (or once from the console). A brand-new world
has no scene yet: make one with ground, light and a player first with
`zero scene create --startup main player` in the shell, then open
`scenes/main.scene/build.luau` and add these two lines before its last `end`:
```lua
local w = entity.spawnSynced("Weather")
w.component.add("Cloudburst", { preset = "steady_rain" })
```
3. Press play. That's rain.
**Change one word to change the weather:** `preset = "alpine_snow"`, `preset = "night_storm_town"`.
That is the whole switch from rain to snow to a thunderstorm.
Any single setting can change while a preset runs: set `rainLook = "pixel"` (or `snowLook`,
`lightning`, `splash`, `fogBank`, `kind`, `wind`) and the weather keeps everything else the preset
had and changes just that, live, for every player. Or clear `preset` and pick a `kind` (`clear`,
`cloudy`, `drizzle`, `rain`, `showers`, `downpour`, `thunderstorm`, `snow`, `sleet`, `hail`, `wind`,
`dust`, `leaves`, `ash`, `fog`, `mist`) with one `intensity` dial from 0 to 1. A kind picked on its own comes in at its own natural
strength (rain 0.6, downpour 0.85, ...), whatever the weather before it, and while a preset runs the
fields always show the preset's own kind and looks, so picking a kind always brings that weather.
`wind` is a dial from 0 (still) to 1 (a gale), or
-1 for whatever the kind brings; picking a new kind brings its own wind back unless you set `wind`
in the same change. Changes fade in over `changeSeconds`. A name the kit does not know
is warned about once and falls back to clear.
From code, on any player:
```lua
local Weather = require("cloudburst.weather")
Weather.preset("night_storm_town", 30) -- fade into a storm over 30 s
Weather.set({ kind = "snow", intensity = 0.8, snowLook = "fluffy" })
Weather.cycle({ { "clear_day", 3 }, { "steady_rain", 2 }, { "night_storm_town", 4 } })
```
## Forecasts
A forecast changes the weather by itself, on the shared session clock: every player sees the same
step and the same fades, and a player who joins late sees what everyone else sees. It comes in two
forms, in the component's `cycle` field (the inspector, or
`entity.find("weather").component.get("cloudburst.Cloudburst").cycle = ...`) or from
`require("cloudburst.weather")`.
**Runs once and holds its last weather.** End on a step with no minutes. A storm that clears into a
calm night and stays:
```lua
-- the field
cycle = "night_storm_town:4, steady_rain:3, autumn_drizzle:2 blend 60, calm_night"
-- or from code
Weather.forecast({ { "night_storm_town", 4 }, { "steady_rain", 3 }, { "autumn_drizzle", 2, 60 }, { "calm_night" } })
```
Four minutes of storm, three of rain, two of drizzle (fading in over 60 s), then the calm night for
good, until the forecast or the `preset` changes. A player who joins after it ended walks into the
calm night, not the storm. The first step fades in from the weather in force when the forecast was set.
**Loops.** Give every step its minutes; the first step fades in from the last, exactly as before 1.6.4:
```lua
cycle = "clear_day:3, steady_rain:2, night_storm_town:4"
Weather.cycle({ { "clear_day", 3 }, { "steady_rain", 2 }, { "night_storm_town", 4 } })
```
Each step is `preset:minutes`, with `blend N` for the seconds it fades in over (default
`changeSeconds`) and `90s` for a length in seconds. `cycleRepeat` says the form outright: `auto`
(the default: once when the last step has no minutes, else loop), `once` or `loop`
(`Weather.forecast(steps, { loop = true })` loops too). Picking a preset or a kind by hand stops a
forecast; `cycle = ""` (or `Weather.cycle(nil)`) holds the weather where it is.
## What's new in 1.6.8
- **No change to the weather itself.** The Cloudburst package's code, components, presets and sounds are the same as 1.6.7. This release restores test coverage in Cloudburst's own world and states how a game depends on Cloudburst so an install brings it.
- **worldClockKit's tests are back in this world.** PR #20 removed `worldClockKitTests` from this world's worldClockKit copy because it failed when the world was mounted as a library. It tested real behaviour here (the showcase runs worldClockKit with Cloudburst drawing its weather), so it is restored from worldClockKit 1.7.12, the version this world now installs. Its one Cloudburst case now accepts the world's own Cloudburst host holding the weather: the clock stands aside and adds nothing on top. In a world that reaches Cloudburst only as the `@cloudburst` library that case is skipped with its reason, as 1.7.12 already did.
- **Depending on Cloudburst from a package.** List `cloudburst` under `dependencies` in your package.yaml, install Cloudburst as a package (`zeromind.installAsset`), and reach it by name (`require("cloudburst.weather")`, component `cloudburst.Cloudburst`). An install of your package then brings Cloudburst along. A world that holds Cloudburst only as the `@cloudburst` library does not pass it on: an install never carries a library.
## What's new in 1.6.7
- **The scene's fog is read four times a second, not every frame.** With the weather's own fog off (`fog = false`, the way worldClockKit runs it), the drops are lit by the scene's height fog, and asking the fog system for it resolved its applicable values every frame. In Hold the Line's last wave the Luau sampler put 36 of the weather's 53 ms a second there (about two thirds of the weather's frame). Now the answer is kept for `Director.FOG_EVERY` seconds (0.25; set it to 0 for the old every-frame read, which is how the before and after were measured in one session). A fog change reaches the drops within a quarter of a second; `Director._clearFogCache()` reads it again at once. Rain, snow and fog look the same. Tests: cloudburstFog (with a new case for the cache) and cloudburstForecast pass; cloudburstQuality's two indoors cases fail on 1.6.6 the same way, unrelated to this change.
## What's new in 1.6.6
- **No more frame drops from the landing map in busy scenes.** The map of where drops land used to cast a fixed 256 renderer rays every frame while it baked, and re-cast itself whole every time the scene's renderable count changed. In a horde shooter with a dense rooftop (Highrise Holdout, boss wave 10, night storm) that meant 0.3 to 2.4 s frames. Rays are now cast under a time budget per frame (1 ms in the background, 4 ms when the camera needs a map now), coarse cells first, and a change in renderables only re-checks 12 cells before deciding to re-cast. The shelter probe for the rain sound casts one ray a frame instead of nine at once. Measured there: before, fps median 2.3 (0.5 while baking), Cloudburst median 323 ms a frame; after, fps median 37.7, Cloudburst median 3.3 ms, p95 7.0 ms. Same map, same heights, same sound. Tests: cloudburstFog, cloudburstForecast and cloudburstQuality pass.
## What's new in 1.6.5
- **Cheaper weather every frame, same weather.** The weather used to write the engine's Wind component every frame, ask the audio engine which entity listens every frame and read the scene's ambient and sun every frame (a module require and two engine queries). Now the Wind is written only when the wind moved (by more than 0.02 m/s), the listening entity is asked for twice a second (its position is still read every frame) and the scene's light four times a second. Measured in this world's showcase, the old and new code alternated in one play session, the Cloudburst row of the profiler: 4.32 -> 0.72, 1.71 -> 1.44 and (30 s medians) 1.60 -> 0.64 ms a frame. In Hold the Line, where worldClockKit drives Cloudburst, this weather was the largest script cost of the frame. Rain, wind, thunder and fog look and sound the same. Tests: cloudburstFog, cloudburstForecast and cloudburstQuality pass.
## What's new in 1.6.4
- **Forecasts that run once.** `cycle = "night_storm_town:4, steady_rain:3, autumn_drizzle:2 blend 60, calm_night"` (or `Weather.forecast(...)`) runs a storm that clears into a calm night and holds the night, on the shared clock, a late joiner included. Every step can state its own blend (`blend N` seconds) and a length in seconds (`90s`). `cycleRepeat` (auto, once, loop) names the form; a forecast whose steps all have minutes still loops exactly as in 1.6.3. New preset `calm_night`. Tests: `cloudburstForecast`.
- **The weather's fog no longer edits your scene (#29528).** With `fog = true` the weather used to write its fog into the scene setup's fog as placement overrides, so in edit mode scene authoring recorded them and turning fog off left the clearing's hourly fog stuck at the weather's last values. The weather's fog is now an application of its own, in force over the scene's while the weather runs: nothing is recorded in the scene, and `fog = false` (or removing the weather) gives back the scene setup's own fog by the hour. Another script's `fog.set` while the weather runs lands on the weather's fog instead of raising. New test in `cloudburstFog`.
## What's new in 1.6.3
- **Cheaper weather every frame, same look.** The atmosphere used to hand the height fog to the engine on every frame, and each hand-over runs the engine's full settings check and render feature update (about 1.5 to 1.9 ms on a desktop CPU). It now hands it over only when the fog really moved (density by 0.2%, a colour or the sun direction by about half an 8-bit step) and once a second besides, so fog another script cleared comes back as before. Measured in the showcase with steady rain: the Cloudburst component went from about 3.0 ms to 1.1 to 2.0 ms per frame, the fog part from about 1.7 ms to under 0.1 ms. Pictures from the same camera match.
## What's new in 1.6.2
- Metadata only: the `IndoorVolume` component carries its `.metadata` and the `cloudburstQuality` test suite its README, which a fresh install reported missing in 1.6.1. No code changes.
## What's new in 1.6.1
- **Rain that fits a 60 fps budget.** A quality ladder: `quality = "ultra" | "high" | "medium" | "low" | "auto"`. Up close, high is the same rain as ultra; it saves its time in the distant layer, where a drop is a pixel wide: those drops are lit flat by the air they stand in (no refraction read, no shadow lookup, at most 6 lamps) and thin out past 12 m, the survivors drawn denser so the distance reads as thick as before. Every level also stops drawing drops the frame would fade to nothing (inside the near fade, past the far fade) and decides whether a fragment is visible before lighting it. `auto` follows the engine's quality tier (`renderer.qualityTier()`), which is the device's own and what Graphics Presets' steps set, so a player's graphics setting reaches the rain with no link between the kits.
- **`density`** (0 to 2) multiplies how much falls on top of quality, and **`farRain`** (`auto`, `full`, `cheap`, `off`) picks the distant layer by itself; `off` leaves the distance to the rain curtains.
- **Indoors, per player.** Inside a building the storm's height fog no longer washes the room: an **`IndoorVolume`** box around the camera, a camera with `environment = "isolated"`, or `Weather.setIndoors(true)` thins this player's fog to `indoorFog` (15%) and stops drawing rain, snow, splashes, curtains, clouds and mist for them (and stops their GPU paying for them). It eases in and out over about a second; nothing is synced. `Weather.indoors()` reads it, `Weather.quality()` reads the level in force.
- Tests: `cloudburstQuality` (quality ladder, auto, indoors forced, an indoor box turned and not).
## What's new in 1.5.5
- **Black nights stay black with the weather's fog off.** With `fog = false` (the scene keeps its own HeightFog), every rain, sleet, flake and splash layer used to get a grey default fog colour, so at night every drop glowed light grey-blue over the whole sky. The drops now light and fade by the scene's own fog, and go dark at night except near lamps and lit glass. `fog = true` looks exactly as before. Found and fixed by Claude_test_nro_2 (pull request #2 on nordic_suburb_kit); landed here with a new test suite, `cloudburstFog`, and the choice of fog as `Director.fogFor`.
- Built on the current engine library (93d6d4b).
## What's new in 1.5.4
- **Quiet scene reloads.** The atmosphere no longer calls `entity(id)` on scene lights that are already gone, so a scene reload or play flip no longer logs `entity(...) returned nil` errors (issue #7). The light reads check `entity.exists(id)` first, the way the flash light already did.
- Built on the current engine library (33551d3).
## What's new in 1.5.3
- **Fog banks that float as clouds.** `FogBank.cloud` (0-1) and the new `cloud` bank kind: a round, noise-ragged footprint and a puffy profile that thins toward the top and the underside, so a bank hanging in the air reads as a soft cloud from near and far instead of a pale box. Every other bank keeps its look, with its square corners now rounded.
## What's new in 1.5.2
- **The package's own description is current.** The one-paragraph description ZeroMind shows for
the package now lists all 16 kinds, 31 presets and 5 fog banks, and says how to install it and
make it rain. The kit's code is the same as 1.5.1.
## What's new in 1.5.1
A look pass over hail, mist and lightning, from near and far, at noon, dusk and night:
- **Lightning keeps the night dark.** A strike used to lift the whole scene to a flat grey: even a
far one turned a night street into an overcast afternoon for a moment. A flash now tints the
fog a cold blue and lifts the sky light less, so a far strike is a blue-white blink and a near
one still lights the street. Daylight flashes still read.
- **No hail bubbles on the lens.** A hailstone falling right in front of the camera used to fill
the frame as a large blurry grey ball. Stones now fade out before they reach the lens; the ones
bouncing at your feet stay.
- Hail, mist and fog were checked at every distance and time of day and needed no change.
## What's new in 1.5.0
- **A downpour reads as a wall of rain from far away.** Across a field in daylight, heavy rain and
thunderstorms now stand as soft grey shafts of falling rain, darker than the sky behind them,
instead of fading into flat fog. The fog in heavy rain is thinner, so the rain itself greys out
the distance. Close up nothing changed, and no hard streaks came back.
- **Four new kinds:** `showers` (passing showers that build, pour and clear on a shared loop),
`dust` (sandstorms and dust storms that turn the air tan), `leaves` (autumn leaves tumbling on the
wind) and `ash` (ash falling under a dim sky). Sand, leaves and ash never settle like snow.
- **Eight new presets:** `light_drizzle`, `passing_shower`, `tropical_monsoon`, `foggy_harbour`,
`autumn_leaves`, `dust_storm`, `sandstorm`, `ash_fall`. Each is the same one-field swap as the
rest, and a new `dust` fog bank goes with the sandstorm.
- **A better default.** A `Cloudburst` with nothing set now starts on `steady_rain`, rain you
clearly see in daylight, instead of the faint `light_spring_rain`.
- **Pick a preset.** A table below gives every preset with what it looks like and when to reach
for it, and the guides say what you should see after each step and show a storm intro that runs
once with `Weather.lastChange()`.
## What's new in 1.4.12
Review fixes on top of 1.4.11 (docs only, no kit code changes):
- **`lastChange()` examples are safe for a player who has just joined.** A joining player can run
its scripts a moment before the shared weather reaches it, so the README and the how-to guide now
ask again after a short wait before starting a storm, as the village example already did.
- **Forecasts are spelled out.** The steps of a running forecast do not count as changes for
`lastChange()`; setting the forecast with `Weather.cycle` does.
## What's new in 1.4.11
Contributed back by a world that installed Cloudburst (pull request #4). 1.4.10 was never released
on its own; its change ships here.
- **Ask whether the weather already changed this session.** `Weather.lastChange()` (and the
component's `lastChange()`) answers nil until someone changes the weather in this session, then
when the change started, its fade and how far along it is. A change saved with the scene or made
in edit mode before play does not count, and neither do the steps of a running forecast (setting
the forecast with `Weather.cycle` does). A storm intro now runs once, and a player who joins
mid-storm no longer starts it over.
- **The village example reaches dusk without worldClockKit.** Step 4 said its lamp-post code turned
the scene's sun down, and it did not, so the storm came in under an afternoon sky. It now dims the
starter scene's sun, ambient and sky, and gives the values for a full night.
## What's new in 1.4.9
- **Play and stop are quiet.** Pressing play or stop prints nothing from Cloudburst. The storm
lighting no longer reaches for a scene light that is not there yet (two red "returned nil"
errors at every start), and the landing map now goes only to the shaders that read it (rain,
snow and splashes; `Weather.bind` hands it to your material only when its shader declares a
`landmap` texture), so the curtain, mist, clouds, pond and puddle no longer warn about it.
- **Issue links you can follow.** The known limits name the Zero engine's GitHub issues,
[zero#25852](https://github.com/OrigoZero/zero/issues/25852) and
[zero#24706](https://github.com/OrigoZero/zero/issues/24706) on OrigoZero/zero.
Earlier, in 1.4.7 and 1.4.8:
- **Stopping play is clean.** Leaving play or the world no longer fills the log with red clean-up
errors: the weather checks a light or the lightning bolt still exists before handing it back.
- **A picked kind brings its own wind.** Choosing `wind` after a calm preset now gives a real gale
(before, the preset's light breeze stayed behind). Set `wind` in the same change to override it.
- **Honest docs.** A Known limits section with the issue to follow for each, the downpour cost
measured again with the true drop counts for each quality setting, and both guides matching
what the kit does today.
## What's in it
| | |
|---|---|
| **Kinds (16)** | `clear`, `cloudy` (overcast), `drizzle`, `rain`, `showers` (passing showers that come and go), `downpour`, `thunderstorm`, `snow`, `sleet`, `hail`, `wind` (wind and gusts), `dust` (sandstorm / dust storm), `leaves` (autumn leaves on the wind), `ash` (ash fall), `fog`, `mist` |
| **Rain looks** | realistic, cinematic heavy (glints round lamps), soft painterly, cartoon, pixel, ink / woodblock |
| **Snow looks** | soft realistic, big fluffy cartoon, fine powdery blizzard, pixel |
| **Carried on the wind** | blowing sand and dust, tumbling autumn leaves in red, orange, gold and brown, soft grey ash |
| **Lightning** | storm (forked and in-cloud), close forked strike, flash inside the clouds, distant silent heat lightning |
| **Splashes** | realistic crown, misty spray, cartoon, pixel, ink, none |
| **Fog banks** | valley fog, ground mist, sea fog, town haze, dust and sand: as the weather's own fog, or placed where you want one with the `FogBank` component |
| **Water** | `cb_pond` and `cb_puddle` materials that ring where drops land; `Weather.bind(material)` for your own |
| **Sound** | drizzle and steady rain beds, rain drumming on the roof when you stand under cover, thunder near and far; the wind beds come from **Soundstage**, which installs with Cloudburst |
| **Presets (31)** | see *Pick a preset* below |
Every preset is the same handful of settings, so swapping one for another is one change. With no
`preset` set at all, a new `Cloudburst` starts on `steady_rain`.
## Pick a preset
Set `preset` to the name in the first column. The list is also the order the Weather Lab and
`Weather.presets()` give them in.
| Preset | What it looks like | Reach for it when |
|---|---|---|
| `clear_day` | A bright, breezy day with a few clouds. | The weather should step aside; the calm between storms. |
| `light_drizzle` | The faintest fine rain under a pale grey sky; the ground darkens slowly. | A damp, quiet mood without a storm. |
| `light_spring_rain` | Soft, fine rain under a bright grey sky; puddles slowly form. | A gentle, fresh rain in daylight. |
| `steady_rain` | An ordinary wet afternoon: rain you clearly see, splashes on the street. | The default. Any game that just needs rain. |
| `passing_shower` | A shower builds, pours for a minute, then clears to a brighter break, over and over. | Open worlds and long sessions: rain that comes and goes by itself. |
| `autumn_drizzle` | Grey, gusty, cold drizzle blown in sideways. | Bleak moors, coasts, a cold walk home. |
| `tropical_downpour` | Warm, vertical, deafening rain; the far side of the street disappears. | A sudden cloudburst; jungles and hot cities. |
| `tropical_monsoon` | Warm rain blown in sheets off the sea, gusting hard, the horizon gone grey. | Monsoon season, typhoons, island and harbour levels. |
| `night_storm_town` | Lamps glinting through sheets of rain, lightning over the roofs, thunder rolling in. | The big set piece: a thunderstorm at night. |
| `noir_rain` | Hard rain in streetlight, every lamp haloed in falling glints. | Detective streets, neon alleys, moody cut scenes. |
| `hailstorm` | Hailstones bouncing off the cobbles, with close strikes. | A violent summer storm; a hazard players feel. |
| `sleet_squall` | A cold, sharp shower of icy rain. | Late autumn and early spring; the edge of winter. |
| `alpine_snow` | Big quiet flakes drifting down, snow settling on roofs and fences. | Winter villages, mountains, Christmas. |
| `blizzard` | Fine snow driven sideways by a howling wind; you can barely see the next house. | Survival, mountain passes, getting lost. |
| `misty_dawn` | Still air, low sun, mist lying in the low ground. | Mornings, graveyards, the start of a level. |
| `valley_fog` | Fog filling the low ground while the hilltops stand clear. | Hills and valleys; climbing out of the fog. |
| `sea_fog` | A cold grey fog rolling in off the water. | Coasts, cliffs, a ship coming in. |
| `foggy_harbour` | Thick, wet sea fog over the quay; masts and lamps fade a few boats out. | Ports, fishing villages, smugglers. |
| `town_haze` | A warm, smoky evening haze over the rooftops. | Dusk in a town; summer evenings. |
| `gale` | Dry and wild: trees thrashing, gusts coming in waves. | Coasts, heaths, a storm that never breaks. |
| `autumn_leaves` | A crisp, breezy afternoon with red and gold leaves tumbling past on the gusts. | Autumn forests, parks, harvest towns. |
| `dust_storm` | A dry, gusty wind lifting dust off the road, the light gone hazy and warm. | Westerns, farmland in a drought, dirt roads. |
| `sandstorm` | A wall of blowing sand: the sun a pale disc, the air tan, the far dunes gone. | Deserts; a storm that forces players to shelter. |
| `ash_fall` | Grey ash drifting down from a fire or a volcano, the sun dim and orange. | Volcanoes, burning cities, after a battle. |
| `summer_heat_lightning` | A warm, dry night with silent flashes far off on the horizon. | Summer nights; unease without rain. |
| `painted_showers` | Soft brush-stroke rain for storybook worlds. | Painterly and storybook art styles. |
| `cartoon_rain` | Chunky blue dashes and bouncy splashes. | Cartoon and toon-shaded games. |
| `cartoon_snow` | Big round flakes drifting down on a cosy evening. | Cosy and cartoon winters. |
| `pixel_rain` | Rain that steps like sprites. | Retro and pixel-art games. |
| `pixel_snow` | Square flakes for retro winters. | Retro and pixel-art games. |
| `woodblock_rain` | Long, even, inked lines of rain in the manner of an ukiyo-e print. | Ink, woodblock and Japanese-print styles. |
## Why it looks right
- **Each drop is a little lens.** It shows the scene behind it, bent, and keeps a visible contrast
against it: a touch brighter over a dark wall or tree, a touch darker over a bright sky. Sun,
lamps and lightning add their own glint on top, so drops sparkle round a street lamp without the
whole curtain turning white.
- **No two drops alike.** Sizes, brightness, speed and streak length vary per drop, and each one
rides its own eddy of the wind. A near drop never smears into a scratch across the screen.
- **Thick near, curtains far.** A dense near layer, a wider far layer, then grey sheets of rain
standing in the distance that melt into the fog.
- **Soft where it meets things.** Drops fade out where they meet a wall or the ground instead of
being cut off by it, and they fade in from the lens so nothing pops in your face.
- **Overcast means overcast.** A rain deck takes the sun's hard shadows away and the sky light
carries the scene; storms darken it further.
## How it works (and why it is cheap)
- **All falling weather lives on the GPU.** Each layer is a static mesh of quads whose motion is in
its shader; per drop there is no CPU work at all. A downpour costs the same CPU as a drizzle.
- **One surface pass does the ground.** Wetness, settled snow and dry ground under cover come from
Cloudburst's own surface pass (`cloudburst.surface`, the `surfaceWeather` render feature, which
reads a cover field baked over the scene's geometry); fog from the engine's height fog; wind from
the engine's `Wind` (so foliage and physics lean with the rain). The `SurfaceWeather` component
puts wet ground or settled snow in a scene with no falling weather at all.
- **The landing map** (`cloudburst.landing`) is the one piece the engine lacked: the height of the
top surface a drop meets coming down, cast around the camera under a small time budget a frame,
coarse cells first. Drops stop on
roofs (none indoors), splashes sit on what they hit, and drips are found at every eave.
- **Multiplayer**: the weather is a few synced fields plus the shared session clock. Lightning
comes from a seeded schedule on that clock. Nothing streams per frame.
- **Flash safety**: two lightning strikes never start less than 2.6 s apart (a strike that would
land sooner after the one before is skipped, the same on every player's screen), so there is
never more than one flash in any 2.6 s. Each is a single soft pulse with capped
brightness. `Weather.setFlashComfort(0..1)` lowers it further per player.
- **Quality**: `quality = "ultra" | "high" | "medium" | "low" | "auto"` on the component; see
*What a downpour costs the GPU*.
- **Indoors**: `IndoorVolume` boxes, an isolated camera or `Weather.setIndoors(on)` thin the fog
to `indoorFog` and stop the falling layers for that player alone.
## What a downpour costs
Measured on Cloudburst 1.4.6 with engine library @builtin 28ef193, in the showcase village street (1.5.0 adds a few shader instructions to the distant curtains and new particle types, but no per-frame script work; the drop counts are unchanged)
in the tropical downpour preset (the heaviest rain), camera on the street, 1920x1080, development
build of the editor on a Linux desktop (Intel Arc B-series GPU), 6 to 8 seconds of frames each.
| Setting | Rain drops drawn | Cloudburst's own CPU per frame | Whole engine CPU per frame |
|---|---|---|---|
| Clear sky, for comparison | none | 0.94 ms | 17.1 ms (median 17.2) |
| Downpour, `quality = "high"` (desktop) | 64,000 + 3,600 splash slots | 1.27 ms | 18.5 ms (median 18.0) |
| Downpour, `quality = "medium"` (what a browser gets) | 45,500 | 1.11 ms | 20.1 ms (the desktop was busy: the engine waited for a core for half the frame) |
| Downpour, `quality = "low"` (what a phone or tablet gets) | 26,600 | 0.96 ms | 18.3 ms |
- The rain itself costs the CPU almost nothing: every drop moves on the GPU, so going from a clear
sky to the heaviest downpour adds about a third of a millisecond of script time. The whole-frame
difference, about 1 ms, is the size of the run-to-run noise on this machine.
- `quality = "auto"` (the default) picks `medium` in a browser and `low` on phones and tablets by
itself. A heavier look draws more than its share (the downpour uses the cinematic look, 1.25 times
the drops), which is why the medium and low rows are more than 60% and 35% of 64,000.
- These are the browser's and the tablet's **settings** run on a desktop, not those devices
themselves (see Known limits).
## What a downpour costs the GPU
The rain is transparent quads lit per pixel, so its GPU cost is the pixels its drops cover times
what each pixel does. What drives it, largest first:
| what | why it costs | what 1.6 does about it |
|---|---|---|
| the far layer (42,000 drops in a 56 m box) | every drop is at least 1.6 px wide however far, and each pixel read the scene colour, the sun's shadow map and up to 32 lamps | high and below light it flat (no refraction, no shadow, 2 to 6 lamps) and thin it past 8 to 12 m, survivors drawn denser |
| drops the frame never shows | drops inside the near fade (under about half a metre) and past the far fade were rasterised and then faded to zero | dropped in the vertex stage on every level |
| fragments that end up invisible | the lighting ran before the fade was known | the fade is worked out first and the fragment discarded |
| lamps | each drop pixel loops over every point light in range | capped per layer: ultra 32, high 16 near / 6 far, medium 8 / 4, low 4 / 2 |
| resolution | cost scales with pixels: 4K costs about four times 1080p | follows the engine tier, which Graphics Presets lowers with the render scale |
Measured before 1.6 in Low Water's dam crest storm at 1920x1080 on a desktop GPU (profiler.gpu):
the transparent pass that holds the rain took 8.7 ms, and the surface weather pass
(wet surfaces, `surfaces = true`) took 8.0 ms; 3200x1756 in the editor window took 12.5 ms for the
latter. The surface pass is `cloudburst.surface`: turn
`surfaces` off on a weak device if it is too slow. To read the rain's
share on your own scene: `tools.use("profiler", "gpu")` in a window (a headless sub-client resolves
no GPU timings), once with `quality = "ultra"` and once with your level.
## Known limits
Things you will run into, said plainly. Each names the open issue to follow on the Zero engine's
GitHub tracker, [OrigoZero/zero](https://github.com/OrigoZero/zero/issues):
- **Stepping under a roof switches to a second recording rather than muffling the storm**
([zero#25852](https://github.com/OrigoZero/zero/issues/25852) on OrigoZero/zero: audio has no
low-pass filter). The engine cannot muffle (low-pass) a playing sound on its own yet, so Cloudburst fades
the outdoor rain down and a recorded clip of rain drumming on a roof up. It sounds right under a
roof or porch, but it is the roof clip's rain you hear, not a duller copy of the storm outside,
and thunder and wind are only turned down, not dulled. When the engine gains a filter, the kit
will use it.
- **Frame time in a real browser and on a real Android tablet has not been measured**
([zero#24706](https://github.com/OrigoZero/zero/issues/24706) on OrigoZero/zero: reading frame
time in a browser engine). The cost table above runs those devices' settings on a desktop. How long a frame takes
on the devices themselves, and what the rain passes cost the GPU on their own (this build's GPU
timer does not break those passes out), is still to be measured. If you measure it, please leave
the numbers in a comment on the kit.
- **Roofs you move while playing** keep their old shelter for a moment: the landing map re-casts by
itself when things are added or removed, but a roof that slides needs
`require("cloudburst.landing").rebake(cameraPosition)` (see the how-to guide).
- **Skyclock brings the Cloudburst it was released with.** Skyclock (worldClockKit) 1.7.1 was
released alongside Cloudburst 1.4.5, so a world that installs only Skyclock gets 1.4.5 with it.
Install Cloudburst itself to get this version. Skyclock asks for Cloudburst by name, so in this
showcase both run on the one copy of Cloudburst 1.5.0.
- **Rain follows the active camera.** Drops are drawn in a box around whichever camera is drawing
the screen; a camera far from the player sees rain around itself, not around the player.
## For other kits
- `Weather.now()`: the weather this frame (rain, snow, wind, fog and the rest from 0 to 1, wetness,
wind vector).
- **Named values**, for kits that should not depend on Cloudburst: every frame the weather entity
holds `weather.rain`, `weather.snow`, `weather.wetness` (0 to 1) and `weather.wind` (vector, m/s).
`values.get(id, "weather.rain")` on any entity `values.entities()` lists reads it; a water kit
rings its lakes and puddles from it with no require of Cloudburst.
- `Weather.lastChange()`: the change of weather made this session (`at`, `seconds`, `ago`,
`progress` 0 to 1, `settings` it is changing to), or nil when nothing has changed since the
session began. The same answer on every player, a late joiner included, so a storm intro runs
once. A player who has just joined may run its scripts a moment before the shared weather reaches
it, so ask again after a short wait before changing anything:
`task.delay(5, function() if Weather.lastChange() == nil then Weather.preset("night_storm_town", 60) end end)`.
The steps of a running forecast do not count as changes; setting the forecast does.
- `Weather.onStrike(fn)`: every lightning strike, on every peer at once.
- `Weather.landsAt(x, z)`, `Weather.isSheltered({x,y,z})`, `Weather.landings(centre, r, dt)`:
where rain lands.
- `#include "cloudburst.shaderModules.cb_common"` and `cb_ripples(...)` in your water shader;
`Weather.bind(material)` keeps its `cb_rain` input current. `cb_pond` and `cb_puddle` are ready-made.
## Guides inside
- *How to make it rain in my game*: adding weather, picking a kind, changing it over time,
presets, shelter, sound, multiplayer.
- *Example: a village thunderstorm at night*: step by step from an empty world to a lamp-lit
street going from dusk into a storm.
## Works with
**Skyclock** (worldClockKit) for day, night and street lamps: its rain, snow and storms are drawn
by Cloudburst, and storms dim whatever sun it sets. Cloudburst needs no clock kit of its own.
# Low Water
A complete first-person survival horror game, for one player or two in co-op, built almost entirely from installed kits. Install this package and you get the whole game: its three scenes, its level, its story, its tuning, its art direction and its sound. Every system it runs on (flashlight and battery, failing lights, scripted events and scares, the tension director, the creature that hunts by light and sound, notes and tapes, saving, menus, weather, water) comes from the kits it declares.
Version **1.0.17**.
## The game
Storm night, October 1974. The Varne valley dam has gone silent, and its reservoir has been drained for the first time in forty years, uncovering Hollin Varne, the village that was flooded to build it. You are the relief engineer sent up the mountain road when the night shift stopped answering. Something came up out of the mud with the village.
Six areas, walked one into the next:
1. **The access road and the dam crest** in a rainstorm, the sodium lamps dying one by one.
2. **The control house**: the shift office, the shift log, the mimic panel, a safe room and the first save lamp.
3. **The turbine hall**: four dead generators. Reset the section breakers and the power comes back hall by hall, while the Lowman hunts your light.
4. **The inspection galleries and the spillway tunnel**: black water on the floor, rising behind you, and a Lowman that hunts by sound.
5. **The drained reservoir and the drowned village**: fog, mud, the church of St Brannoc and its bell. The reveal.
6. **The intake tower**: throw the gate hoist so the water comes back, then run for the truck. A real ending, then credits.
A first playthrough takes 25 to 40 minutes. A clear objective is always on screen. Nine authored scares are each chained to the story beat that guarantees you are there, so every one of them fires.
**Controls:** WASD move, mouse look, **F** flashlight, **V** shake a dying flashlight, **B** swap battery, **G** radio, **E** use, **Esc** pause. Gamepad and touch work too, and every action can be rebound in Settings.
**Choices that matter:** the Lowman hunts by your light and by your noise. Turning the flashlight off and keeping quiet are real choices, and the radio in your left hand crackles louder as it closes in.
**Progression:** XP for every step, and four upgrades kept between nights (a heavy-duty battery pack, crepe soles that carry half as far, a long whip antenna that warns earlier, a first aid kit).
**Co-op:** a second player joins the same night. Each player has their own flashlight, fear, health, radio and HUD; both see the same doors, lights, water, scares and creature. A downed partner can be revived.
## Play it
Install the package; its scene `lowWater.scenes.main` is the game. Make it your world's startup scene (`startup_scene = "lowWater.scenes.main"` in `.world_settings`) and press Play: the game starts on the title screen.
## How it is put together
| part | what it holds |
|---|---|
| `scenes/main` | the one scene every player shares: the interior areas, the player, the HorrorDirector, the storm, the shared reservoir |
| `scenes/exterior`, `scenes/village` | the heavy exterior (crest, dam, valley, tower; the drained bed, village and church), additive scenes each player loads beside main |
| `layout` | every area's bounds and connections, spawn, save lamps, key spots, creature anchors and lairs, light circuits and water volumes |
| `core` | area streaming (each player's view shows its area and neighbours), the outdoor scene loader, the radio adapter on omenKit, the water adapter on floodKit |
| `exterior`, `interior` | the level: set pieces as scene modules, lights on eerieLightsKit circuits, Tidewater water, Cloudburst fog and indoor volumes |
| `story` | the night: 19 steps as scriptedEventsKit cues, the scares, the Lowman (stalkerKit kinds and encounter phases), lore, progression, New Game and Continue, the ending |
| `ui`, `audio` | the menusKit look, title, pause, settings, game over and credits, the horrorKit HUD palette, the hands, ambience, music and voices |
The guides inside the package go further: **How Low Water is put together** and **Example: make a survival horror game from the horror kits, with Low Water as the worked example**.
## Built on
| kit | version | used for |
|---|---|---|
| horrorKit | 1.0.21 | flashlight, eerie lights, scripted events, scares, tension, the creature, lore, safe rooms, save lamps, HUD (and the kits it brings: saveKit, interactKit, inventoryKit, controlsKit, SecondWind, Lifeline, soundstage, juiceKit, aiKit, navKit) |
| omenKit | 1.1.2 | the radio that warns the Lowman is near |
| floodKit | 1.0.4 | the rising gallery water and the refilling reservoir |
| cloudburst | 1.6.11 | rain, lightning, wind, fog, dry interiors |
| tidewater | 1.2.22 | every water surface |
| graphicsPresets | 1.1.1 | the graphics quality setting |
| menusKit | 1.4.5 | title, pause, settings, game over, credits |
## Tests
- `storyFlow` (test suite): the story's steps, objectives and writing rules.
- `lowWater.story.e2e`: `require("lowWater.story.e2e").run()` in play, as the host, plays the night from New Game to the credits (every step, every objective, the tower lift, the ending, the credits, XP) and checks that all nine scares fired. Last run: 53 of 53.
## Changelog
- **1.0.17**: on Cloudburst 1.6.11, whose rain and thunder sounds are no longer copies inside the kit: they are installed from the worlds they were made in (light and heavy rain, rain on a slate roof, and three thunder claps). Same storm, same sound; the copies Cloudburst 1.6.7 carried are gone.
- **1.0.16**: on floodKit 1.0.4, which states Tidewater 1.2.22. Until now floodKit 1.0.3 still named Tidewater 1.2.19, so the game carried a second, older Tidewater beside the one it plays with; that copy is gone. Same water, same finale.
- **1.0.15**: on Tidewater 1.2.22 (Tidewater FX 1.1.11). In the finale floodKit writes the surge spray's rate every frame; the spray (Tidewater FX spindrift) fell off the device and cooked its whole graph again on the CPU at each write, 4 to 5 ms of script a frame on desktop and 12 to 24 ms in the browser. It now takes those writes on the device. Same spray, same look (pictures media/speedround14, before and after from the same two cameras).
- **1.0.14**: the crest truck's windscreen really draws now, in play. Since 1.0.12 the crest module built it as a plain box, but the exterior scene's saved build (scenes/exterior scene.json and its authoring state) still held the 1.0.10 recipe with a 3 cm bevel on 6 cm glass, and play loads that saved build. The exterior scene is rebuilt from the current crest module here; in play the "could not be made" line no longer appears.
- **1.0.13**: the main scene loads whole again in a fresh client. omenKit 1.1.1 was built on an older @builtin, so installing it placed an old copy of the quick geometry nouns (deps/07158574/versions/29f1a966...), and the main scene build had `mergeGeometries` from both copies: the scene loaded PARTIAL for players since at least 1.0.7. On omenKit 1.1.2 (current @builtin) only one copy is left.
- **1.0.12**: the truck's windscreen on the crest draws again: its 6 cm glass is a plain box now, like the grille beside it. Rounded, its bevel could not be built and every load logged an error.
- **1.0.11**: tried to fix the windscreen by rounding it less (3 cm to 2 cm); the error stayed.
- **1.0.10**: really carries floodKit 1.0.3 and omenKit 1.1.1. In 1.0.9 the pull request merge wrote the older floodKit 1.0.1 and omenKit 1.1.0 files into the release, so 1.0.9 played with floodKit 1.0.1. Both are installed again here.
- **1.0.9**: on floodKit 1.0.3, whose surge starts a ripple ring effect at most every 0.6 s (it asked for six or seven a second, the finale's biggest cost), and Cloudburst 1.6.7, whose landing map is cast under a time budget and whose scene fog is read four times a second. 1.0.8 was never published: this release carries its Cloudburst update too.
- **1.0.7**: on Tidewater 1.2.19, whose sea passes only waves at least 3 mm high to physics, so floating things take less physics time. Nothing else changed.
- **1.0.6**: on horrorKit 1.0.21 (saveKit 1.3.21 with its package.yaml, controlsKit 1.4.9) and menusKit 1.4.5, the releases that no longer need the engine's deleted zui UI library; the world entrypoint loads its dark theme through `ui.loadTheme`. 1.0.5 notes were published without a package change.
- **1.0.4**: the exterior and village are walkable from the first frame of every boot, not only once warm (a safety floor under the crest/road, the bridge and the low ground, always built, since the real terrain loads as a deferred additive scene that takes real seconds, and the old fallback was switched off at authoring time whether or not that terrain had actually arrived); the title screen closes for certain on New Game, Continue, Restart and Retry, instead of trusting a heuristic that could skip it; horrorKit 1.0.19 (its barsKit dependency copy carries barsKit's own Showcase component again, so nothing installed differs from what it was published with).
- **1.0.3**: the outdoors is back (after the move into this package the terrain scene module required itself, so the exterior scene was saved nearly empty: no dam, road or tower, and players fell through on the road); New Game starts on the road with ground underfoot; the title screen shows only the menu (the held radio and torch, the interact prompt and the save banners hide while a menu is up, on omenKit 1.1.1's `Omen.setHidden`); faster: area streaming walks only the areas that change, only the two splash kinds the game shows are kept ready (each ready splash ran its effect graph every frame), the storm waterfall keeps only its mist, High shadows reach 90 m; on Tidewater 1.2.16 (its underwater pass compiles again); the reuse review rates every package used, 1 to 5.
- **1.0.2**: first public release (1.0.0 and 1.0.1 were never released with the game in them).
- **1.0.0**: first release.