weather
Everything particulate in GREEN SKY: the dry salt drift and heat shimmer of act I, the travelling rain curtain, the rain itself, drop impacts and rings on the flood, spray, the hail beat, ground mist, and the wingtip vapour the gliders leave.
weather
Everything particulate in GREEN SKY: the dry salt drift and heat shimmer of act I, the travelling rain curtain, the rain itself, drop impacts and rings on the flood, spray, the hail beat, ground mist, and the wingtip vapour the gliders leave.
The engine ships no falling precipitation — only the surface wetness response — so all of it is authored here as GPU sprite emitters.
Consumed by scenes/main.scene/entrypoint.luau, through greensky/film:
build() once on load, update(c) once a frame. Nothing else drives it.
The sixteen emitters
| name | what it is | when it runs | where it stands |
|---|---|---|---|
saltNear | grains an inch off the lens | act I | follows the camera, 12 m box at 0.5 m |
saltMid | the same drift out to 280 m | act I | follows the camera |
saltFar | a low sheet lifting off the whole pan | act I | field, 2.6 km box at 9 m |
shimmer | heat boiling off the crust | act I | field, 2.4 km box |
curtain | the wall's falling streaks | 0:32 – 1:44 | travels, x = 90·(t − 41) |
curtainVeil | the grey the wall hangs in | 0:32 – 1:44 | travels with curtain |
curtainSpray | spray off the wall's leading edge | 0:32 – 1:44 | travels with curtain |
rainNear | the rain the camera stands inside | 0:39 – 1:50 | follows the camera |
rainField | rain filling the middle distance | 0:39 – 1:50 | field, over the runway |
rings | drop impacts ringing on the flood | 0:42 – 1:50 | annulus around the camera |
splash | the column a drop throws up | 0:42 – 1:50 | annulus around the camera |
hail | the hail beat, shot 14 | 1:27 – 1:33 | follows the camera, bounces |
hailSplash | white pocks where stones land | 1:27 – 1:33 | annulus around the camera |
mist | thin on the dry flat, thick on wet ground | act I, then act III | follows the camera |
vapour1..3 | wingtip vapour, one per ship | 0:08 – end | the ships' loaded wingtips |
Three things worth knowing before changing it
Two kinds of emitter. A FIELD emitter stands still over the pan and reads
the same from every station. A FOLLOW emitter rides the live camera's XZ,
because a 90 m box of raindrops is only ever seen from inside it. Follow
emitters read camera.active() — engine state, not another slice's entity —
and switch off at the heights where their weather does not belong.
Impacts are annuli, not discs. Spread drop rings evenly around a camera
15 cm off the water and the nearest ones land ON the lens, where one 30 cm
sprite covers a third of the frame and the shot reads as fog. rings,
splash and hailSplash emit from a disc with an inner radius.
Emitters outlive a hot reload of this file; the module's state does not.
A reload re-runs the module body, which empties the handle table, while the
emitters it held stay alive holding their GPU buffers and still drawing the
last frame they were stepped on — a dry salt pan standing in fourteen thousand
frozen raindrops. Every emitter therefore renames its renderable
GS_WEATHER::<name>, and build() finds the previous generation by that
marker and destroys it before making a new one.
Reading it without watching two minutes of film
M.plan(t)— the whole weather timeline sampled at one film time, as pure numbers. No engine state involved.M.observe()— what every emitter is holding right now, plus the camera station the follow emitters are using.M.hold(t, x, y, z)— pin the weather to one film moment and one camera station, without touching the film clock the other five slices are riding.M.hold()releases. This is how a beat is inspected on an engine several agents share aFilm.seekon.
Scoped to this part · feeds back into the world's score.