Log inGet started
World

Tidewater: Oceans, Lakes, Rivers, Waterfalls, Swimming and Splashes Water Kit (fork)

Branchmain
Commita131260cda

README.md

Tidewater: water for Zero games

Oceans, lakes, ponds, swimming pools, rivers, streams, waterfalls, puddles and wet streets, shorelines and the view under the surface, plus the little water effects that make it feel real. Every kind of water comes in seven looks (realistic, crystal clear tropical, cartoon, painted ink, low-poly retro, pixel art and toy plastic), and they all work the same way, so a lake becomes a cartoon lake, or a pond becomes a river, by changing one setting. The Zero engine ships no ocean of its own: Tidewater is the water, and the engine floats things on every kind of it natively (FluidForces on any water Physics.defineWater declares; Tidewater declares them all).

An ocean in your world in five minutes

  1. Install Tidewater. In the editor's ZeroMind panel search for "Tidewater water kit" and press Install, or in the agent shell run zero zeromind installAsset 59484771-e730-4d73-ab7b-6afb09ab129e (that is Tidewater's guid). The splash and ripple effects (tidewaterFx) come with it. The ready-made scenes are a separate package, tidewaterScenes, because they dress the water with other kits' props and materials; install it as well only if you want them (see "Ready-made scenes").
  2. Add the sea. A new world starts with a main scene; use it, or make another (in the agent shell, zero scene create sea flat --opts '{"startup":true}'). The flat template's ground sits at height 0, right on the waterline, so the sea's shore foam washes over it. The ground is made by the scene's build.luau: delete its ground lines there, or lower its localPosition, for open sea. Then, in the editor, select any entity (or make an empty one at height 0), press Add component and pick WaterBody. Set kind to ocean and preset to tropicalLagoon. The sea appears out to the horizon at once. (From the agent shell, use the code below instead: there is no shell command for Add component.)
  3. Float something. A box with a dynamic body (Physics with kind = "dynamic") and a collider (BoxCollider), plus the Buoyancy component (tidewater.components.Buoyancy, density = 0.5 floats it half under). Press Play: it rides the waves, and it splashes when you drop it in. Add the Wake component and it leaves a foam trail as it moves (from about 1.5 m/s; width sets the trail width).
  4. Change the look. Set the WaterBody's look to cartoon, crystal, painted, lowpoly, pixel or toy. Change kind to lake and give it a size for a lake instead: the entity's height is the lake's surface, and its sculpted bed is drawn, not solid, so add a collider under it if players or boats can reach the bottom (the dock guide's lakeFloor).

The same in code. A scene made with zero scene create builds itself in its build.luau, inside function content(); put these lines there (entity.spawn in a build is saved with the scene):

-- in your scene's build.luau, inside content()
local sea = entity.spawn("Sea")
sea.component.add("tidewater.components.WaterBody", { kind = "ocean", preset = "tropicalLagoon" })

local lake = entity.spawn("Lake", { position = { 120, 4, 0 } })
lake.component.add("tidewater.components.WaterBody", { kind = "lake", look = "realistic", preset = "alpineClear", size = { x = 60, y = 40 }, depth = 6 })
-- later: lake.component.get("tidewater.components.WaterBody").look = "cartoon"
--    or: lake.component.get("tidewater.components.WaterBody").kind = "pond"

-- a boat on the lake: a dynamic body, a collider, Buoyancy and a Wake
local boat = entity.spawn("Boat", { position = { 120, 4.5, 0 } })
boat.component.add("Physics", { kind = "dynamic", mass = 160, angularDamping = 0.5 })
boat.component.add("BoxCollider", { half = { 0.7, 0.3, 1.7 } })
boat.component.add("tidewater.components.Buoyancy", { density = 0.4 })
boat.component.add("Wake", { width = 1.4, length = 3.4 })

From a script that runs in play (not a build), use entity.spawnSynced instead, so every player gets the same water and boat.

After editing build.luau, run zero scene reload scenes.main (your scene's name) before pressing Play, so the saved scene carries the new lines.

Float a ragdoll (or any set of jointed bodies: a chain of barrels, a broken raft). Each part needs a dynamic Physics and a collider; one call floats them all, face down and bobbing, and a river carries them:

local Water = require("tidewater.modules.water")
Water.floatBodies({ torso.id, head.id, armL.id, armR.id, legL.id, legR.id })  -- density 0.95 by default

Let players swim. Swimming is its own package, tidewaterSwim: in the agent shell run zero zeromind installAsset e447ad18-35ce-4b6c-8331-0800d3626a4f (about 35 s; climbKit comes with it), then add one line where your scene's build makes the player prototype's body:

body.component.add("tidewaterSwim.Swimmer", { feel = "arcade" })  -- or realistic, heavy, cartoon

Every player who joins can then wade, swim, tread water, dive and climb out. Its guide, How to let the player swim, has the controls and the ways out of the water.

What you get

KindWhat it isPresets
oceanThe spectral FFT sea out to the horizon: calm glass to a gale, foam where waves break and along the shore, a seabed seen through it, shoaling turquoise over a reef. Can also be a bounded tile (extent).calmClear, darkChop, darkRolling, heavySwell, whitecapped, murkyGrey, paleSwell, glassyDark, gale, tropicalLagoon, northernGale, harbourCalm, moonlitSwell
lakeA still sheet in any outline over a sculpted bed: clear turquoise shallows to dark deep water, sky, sun and surroundings reflected, the bed and its caustics seen through it, shore foam.alpineClear, tropicalLagoon, murkyPond, glacierMilky, darkPeat, nightStill
pondThe small, murkier lake.lilyPond, murkyPond, greenAlgae, koiPond, swampy, clearSpring
poolA tiled swimming pool with coping, deck, strong caustics and optional underwater lights.outdoorPool, backyardPool, indoorPool, nightPoolLit
riverA ribbon along a path that visibly flows downhill, faster where steeper, white water through rapids; its current carries what floats.forestRiver, mountainRapids, lazyLowland, muddyFlood, glacialMeltwater, canal
streamThe narrow, shallow, clear river with pebbles and riffles.brook, mossyCreek, alpineRill
waterfallA sheet falling from a lip, tearing into streaks, into a churning plunge pool with mist, spray and drips.tropicalCascade, grottoVeil, alpineRibbon, wideCurtain, trickle
puddlesPuddles that form only in the low spots of a street while it is wet, mirror-like, ringing in the rain, drying away after.cityStreet, muddyTrack, cobblestone
shorelineWater meeting a long, gentle beach, a slow swell lapping up the slope and a wide band of surf wash along the waterline.sandyBeach, pebbleCove, rockyShore
hotspringA small mineral basin of milky warm water with steam rising off it.milkyBlue, emeraldSpring, mineralTerrace
underwaterA deep basin made to be swum in: strong underwater fog, caustics on the floor, light shafts and bubbles rising from the bed.kelpCove, deepBlue, murkyHarbour

Eleven kinds, seven looks: 77 combinations, shown side by side in the gallery scene.

Looks: realistic, crystal (tropical crystal clear: low absorption, turquoise shallows, the bed sharp through it), cartoon, painted (ink linework over a colour wash), lowpoly (flat-lit facets, retro), pixel and toy (glossy moulded plastic for toy-style games: two candy bands, a hard glossy highlight; also plastic, toybox, bathtub). The environment kits' names are accepted too (real, tropical, clear, toon, painterly, retro and friends).

Underwater, for every kind: murky fog coloured by the water, moving caustic light on the floor, light shafts, the surface rippling overhead, and a waterline split when the camera straddles it.

Effects come from Tidewater FX (tidewaterFx), its own package that installs with Tidewater and works without it: 15 effects, each in the seven looks. Tidewater's Water.splash / Water.ripple and the Wake and Splashes components reach it, and other kits can ask it for a ripple or splash with no dependency at all (see its README).

One-shotContinuous (runs until stopped)
plopa pebble or thrown stonebowbow spray off a moving boat
bodya person or crate jumping inspindriftspray blown off breaking waves
dropletsa body climbing out, shaking offmistmist and spray rising off a waterfall or hot spring
spraya burst of spray in the winddripsdrips falling from eaves, a lip, a hull
footstepa foot landing in a puddle or the shallowsbubblesbubbles rising under water
fishJumpa fish leaving the water and falling back inwakethe foam trail behind a boat or swimmer
rainSplashone heavy raindrop: tiny crown and ringfoama drifting patch of foam in an eddy or under a fall

Splashes happen by themselves. From the moment any Tidewater water exists, anything that falls into it splashes, sized to what it is: a pebble plops, a person makes a big splash, something climbing out drips. Each splash is played by the owner of the body and synced, so every player sees it once. Water.autoSplash(false) turns it off for a game that plays its own.

Floating, flow and asking the water

Every kind declares itself to the engine's water physics (Physics.defineWater), so the engine's FluidForces and Tidewater's Buoyancy component float anything on any water, a river's current carries it downstream, and Physics.onWater hears it splash in.

local Water = require("tidewater.modules.water")
Water.heightAt(x, z)            -- the TOPMOST water's surface height there, or nil
Water.heightAt(x, z, y)         -- the water at height y instead (a lower one of stacked waters)
Water.flowAt(x, z)              -- { x, y, z } m/s: the river's current, the waves' motion
Water.normalAt(x, z)            -- unit { x, y, z } the surface faces (tilted on a wave's face)
Water.surfaceAt(x, z)           -- Surface? { height, flow, normal, depth?, water? } in one typed answer
Water.tideAt(x, z)              -- TideState? { offset, rising, high, low }, nil where that water has no tide
Water.sample({ x, y, z })       -- the engine's whole answer: surface, depth, normal, velocity, floor, body
lake:heightAt(x, z)             -- this lake's own surface there, nil off it (never another water)
lake:surfaceAt(x, z)            -- also lake:flowAt, lake:normalAt, lake:tideNow()
e.component.get("tidewater.components.WaterBody"):heightAt(x, z)   -- and :flowAt, :normalAt, :surfaceAt, for water saved with the scene

crate.component.add("tidewater.components.Buoyancy", { density = 0.45 })   -- floats 45% under, rides the waves
boat.component.add("Wake", {})                        -- foam trail, bow spray, ripples

The module exports the types Surface, TideState and Handle (Water.Surface and friends in strict code), and every nearY argument (the optional third one) picks between stacked waters the way heightAt's does. normalAt, surfaceAt and tideAt were added in this round; heightAt and flowAt are unchanged.

Where waters overlap from above (a lake out over the sea, a pool on a ship's deck), heightAt and flowAt with no height answer the top one, and a body asked about itself answers only for itself: checked with a lake at height 10 over the showcase sea, Water.heightAt gives 10 over the lake and the sea's height beside it, heightAt(x, z, 0) gives the sea under the lake, the lake's own heightAt gives 10 over it and nil off it, and the sea's own gives the sea's height.

Measured: a 400 kg, 1 m box on the tropicalLagoon sea stays within 4 cm of the surface with Buoyancy (6 cm with the engine's plain FluidForces); on a lake it settles 40% submerged, as its density says. On rough seas Buoyancy holds a body to the water by itself: the rougher the water under the hull moves, the harder it couples the hull to it (still water and gentle seas keep the damping you set exactly). Measured over 60 s with a 1 m box at density 0.5: in a gale its centre stays on average 0.15 to 0.45 m under the local surface and dips at worst 0.8 to 2 m in the steepest troughs (before: 3 to 5 m); in a northernGale 0.16 to 0.29 m on average, 0.8 to 1.25 m at worst.

Puddles that follow the weather

Puddles fill in about ten seconds as the ground gets wet and dry away completely within dryTime (75 s by default) after the rain stops, even when a weather kit leaves its wetness at 1: the wetness falls in a straight line and ends at exactly 0, the sheet is hidden and no water is declared. A dry street draws nothing. Measured with Cloudburst rain stopping on the showcase street: coverage 0.85, then 0.49 after 24 s, 0.11 after 54 s (no physics water from here), and exactly 0 by 73 s, while the rain kit still reported the ground 40% wet. Pictures of the same street wet and dry are in documentation/media/ (puddles_wet.jpg, puddles_dried.jpg, round19/puddles_dry_80s_after_rain.jpg).

Storms make the sea rough

An ocean follows the weather. Heavy rain (above 0.3, full at 0.8) or strong wind (above 5 m/s, full at 15 m/s) from a weather kit, or from Water.setWeather, raises a storm sea: stronger wind in the spectrum, bigger swell, choppier crests and more whitecaps. It builds over about 12 seconds and calms the same way when the weather clears. Every player runs the same weather from the same clock, so every player sees the same storm sea. With no weather kit (and no Water.setWeather) the sea never changes. Set followWeather = false on a WaterBody to keep a sea exactly as its preset made it.

Measured on the showcase's calm sea, with the sea's own heights sampled every 13 m over 200 m: calm spread (standard deviation) 0.21 m. A Cloudburst thunderstorm (rain 0.95) took it to 2.3 m in 12 s; clearing the weather brought it back to 0.21 m 13 s later. Pictures in documentation/media/round19/ (storm_cleared_calm_sea.jpg, storm_thunderstorm_sea.jpg).

Moonlight on the sea

At night the sea lays a broad, glittering path of moonlight toward the moon: the engine sky's moon (drawn opposite the sun once the sun is down), or, with a day and night kit that lights the night with the moon (the world clock kit), toward that moon. Day and dusk look as before. The path follows where the moon is: a low moon lays a long column to the horizon (documentation/media/round19/moon_path_engine_sky_no_clock.jpg); a moon high overhead puts the glitter on the waves near you (moon_path_on_AB.jpg beside moon_path_off_AB.jpg).

Tide

An ocean, shoreline or lake can rise and fall like a tide. Two WaterBody fields: tide, the range in metres from low water to high water (0 = none, the default), and tidePeriod, the seconds from one high water to the next (600 = ten minutes, the default).

sea.component.add("tidewater.components.WaterBody", { kind = "ocean", preset = "harbourCalm", tide = 2, tidePeriod = 900 })
local t = Water.tideAt(x, z)    -- { offset = metres above mean, rising, high, low }, nil without a tide
local t2 = handle:tideNow()     -- the same for one water you made with Water.create / Water.attach

Water.create and Water.attach take tide as a number (the range, 600 s period) or a table { range, period, phase }. The tide follows the session's shared water clock (Physics.waterTime()), so every player sees the same water at the same height and a late joiner sees it where everyone else does; nothing is sent over the network. On the ocean the drawn sea, the shoaling against the ground, the underwater pass and the physics water all follow it; on a lake or shoreline the surface and its physics move while the bed and banks stay put. The water follows in 2 cm steps, so a slow tide re-declares its physics only every few seconds, and a water with no tide pays nothing. The maths alone is require("tidewater.modules.tide") (Tide.spec(value), Tide.at(spec, time?)).

Named varieties

Every kind has named varieties (preset); Water.presets(kind) lists them, default first, and the kinds table above names them all. Plain words resolve too, matched without case, spaces, dashes or underscores, the way a person asks for one:

KindPlain words
oceanglassy, calm, stormy / storm, rough, choppy, swell, grey, harbour / harbor
riverlazy, slow, rapids, whitewater, flood, meltwater
poolbackyard, garden, indoor, olympic, night, outdoor
waterfallcurtain, wide, ribbon, thin, veil, cascade, trickle
lakealpine, clear, lagoon, murky, glacier, peat, night
pondlily, koi, swamp, algae, spring
hotspringonsen, milky, emerald, terrace
streamcreek, rill
puddlescity, mud, cobbles
shorelinebeach, sand, pebbles, rocks, rocky
underwaterkelp, deep, harbour

backyardPool (an 8 x 4 m garden pool, 0.9 to 1.6 m deep, wooden deck) is new in this round. A name a kind does not have falls back to its default with a warning naming the real ones.

Rain and other kits

Tidewater needs nothing but the engine and Tidewater FX (which installs with it). Every other kit is optional: it works with Tidewater when it is in the world, and nothing breaks when it is not. None of them is installed by Tidewater, so the rain kit's large install stays your choice.

Why the rain kit and the vehicles kit are optional, not installed with Tidewater. A dependency is installed into every world that installs Tidewater, including the many that only want a lake. The rain kit's install brings about 29,700 files with what it depends on, and the vehicles kit is about 55 MB with the controls kit beside it. Heavy extras inside the install are also what once made Tidewater refuse to install in a fresh world at all. So Tidewater reads their named values when they are there (rain, wetness, wind; any boat with a body floats) and works fully without them. The swimming package is different: it is part of Tidewater and small, so it installs Tidewater, the controls kit and the climbing kit itself.

KitWhen it is in the worldWhen it is not
Cloudburst (rain and storms)its rain rings lakes, seas, pools and puddles, puddles fill and dry with its wetness, and a storm makes the sea roughno rings from the sky and no storm seas; Water.setWeather({ rain = 0.6, wind = 12 }) drives the same thing from your own code
Any other weather kitthe same, if it writes the named values weather.rain, weather.wetness and weather.wind on an entityas above
Vehicles kit (boats)its boats float, bob and lay a wake on every kind of Tidewater waterany dynamic body with a collider and Buoyancy floats; Wake lays the trail behind it
World clock (day and night)the water follows its time of day: dusk light, a moon path at nightthe water follows the engine sky's own time of day
Graphics Presetsquality = "auto" follows its setting, battery saver includedauto picks by device; Water.setQuality(...) sets it from code
tidewaterSwim (swimming)players wade, swim, dive and climb outplayers walk on the bed and do not swim
Tidewater Scenessix dressed starter scenes and the island demothe gallery scene still comes with Tidewater

Checked in a brand new empty world with none of these kits (2026-11-22): the sea and a lake build, a boat and crates float, a jointed body floats, and with tidewaterSwim alone added the player swims.

Any kit can make rings and splashes without depending on Tidewater: Water.ripple(pos, strength), Water.splash("plop", pos).

Multiplayer

WaterBody fields replicate and every peer builds the same water from them; waves run on the engine's shared water clock, so two players see the same swell. A floating boat is a synced body (its owner simulates it, others see it where it is) and its wake is drawn on every peer from its motion. Effects take { sync = true }; automatic splashes are played by the owner and synced, never doubled.

Checked live with two players in the showcase (2026-11-15, two clients in one play session, readings taken at the same instants on the shared water clock):

  • Same waves: the sea at a fixed point agreed within 0.7 to 2.4 cm.
  • Same boat height: the rowboat's hull, owner against second player, at matched moments: -0.055 / -0.019 to -0.048 m, +0.099 / +0.100 m, +0.171 / +0.177 m, +0.106 / +0.134 m (0 to 4 cm apart; the second player draws the boat the usual 0.1 to 0.5 s behind).
  • Two players, checked live: a synced splash thrown on either client was received on the other, and the second player's client draws the wake (5 foam segments in 18 s while the owner rowed, after the fix; 0 before).
  • Checked again on 2026-11-16, twice, the second time after both players left play and came back in (the user's editor and a second client, one play session, the showcase rowboat rowed out from its berth with W by the first player). Every frame both clients recorded the boat's position against the shared water clock; the second player's track was then matched to the owner's at the network delay that fits best (about 0.25 s):
    • Run 1: 8 m rowed, 90 matched samples: heights 3.4 cm apart on average (horizontal 1.8 cm).
    • Run 2, after the reload: 30 m rowed, 533 matched samples: heights 4.3 cm apart on average (horizontal 3.4 cm). The largest single gaps (31 to 34 cm) come from sampling a 0.4 m swell at 3 to 6 frames a second on a busy machine, not from the boat being elsewhere.
    • Wake on the second player: its client laid 35 wake foam segments of its own while the owner rowed (run 2), and the wake shows in its view (documentation/media/r11_second_player_wake_run2.jpg).
    • Splashes and ripples: a synced splash and a ripple ring thrown on either client arrived on the other in both runs (run 2: 4 of 4 from the second player to the owner, 8 from the owner to the second player). One single splash in run 2 arrived late, after more than 3 s, while the owner's client was busy sending its own stream of automatic splashes.
  • Three bugs this found are fixed: an idle boat nobody owned was simulated by no one and froze on the waves (vehiclesKit now keeps an idle boat owned, sent upstream), the Wake loop stopped on every player but the boat's owner (a refused status write ended it), and the wake's foam waited behind 80 or more queued splashes on a player who had just joined, so it laid none (it is now built on the spot, at most once a second per boat, until the pool is ready).
  • Boat height and attitude for every player (2026-11-22). Another player's boat is drawn at the session-clock moment the engine reports for its pose (multiplayer.smoothing(e).stream.moment, 0.22 s behind here) and carried on to session-now: across by the speed its poses move at, and up by how far the sea under the hull rises between those two moments, read on the session-clock sea (Physics.water at the session time), not on this peer's own water clock. The owner shares how far its own water clock runs off the session clock (Buoyancy.clockLead, sent only when it moves by 0.02 s or more). Measured with the user's client and a second client in one showcase play session, both recording every frame and compared at the same session moments every 0.5 s:
    • Before (round 19: the owner's freeboard smoothed over 3 s, drawn on each player's own sea), 61 moored samples: speedboat max 0.67 m, 68% over 10 cm; rowboat max 0.58 m, 49% over 10 cm.
    • After, moored, 61 samples: speedboat max 6.2 cm (mean 1.5 cm), rowboat max 3.7 cm (mean 1.2 cm), none over 10 cm. Driven (speedboat circling at 3 to 6 m/s, 38 samples): height max 6.4 cm (mean 2.1 cm), none over 10 cm; pitch and roll within 0.05 degrees; horizontal mean 1.6 m, max 2.8 m, with the owner's client at 4 fps.
    • Wake: over the same 46 s drive the second player laid 30 foam segments to the owner's 31, each on the owner's track (mean 17 cm, max 1.6 m off) and laid within 0.12 s on average (max 0.59 s) of the owner passing that spot. Fx.wakeLog() lists each player's segments with their session times, so this check can be repeated.
    • Limits: a peer drawing under 30 fps runs its water clock (and its sea) up to 0.5 s behind the session in a sawtooth, because physics catch-up is capped at 2 steps a frame (physics.max_catch_up_seconds = 0.034); a boat that peer owns rides that sea, and the other player sees it up to about 30 cm off on a big swell. The tide's level also differed by 2 to 4 cm between the two clients. Two clients running different content (one started play before an edit landed) float boats on different seas: compare Physics.water at one point and one session time on both before measuring.

Ready-made scenes

tidewater.scenes.gallery: all 77 kinds and looks, labelled, with walkways (Gallery.setTime("dawn" | "day" | "dusk" | "night") relights it). It comes with Tidewater.

Six dressed scenes are their own package, Tidewater Scenes (tidewaterScenes), since they use other kits' terrain, props and materials: tidewaterScenes.scenes.*: tropicalLagoon, northernGale, mountainLakeDawn, forestRiver, rainyStreet, waterfallGrotto, plus the island lagoon demo (tidewaterScenes.demo.island_lagoon). Install it from ZeroMind by searching "Tidewater Scenes", after Tidewater.

Every kind in every look, and against the old ocean

The gallery scene (tidewater.scenes.gallery) holds all 77 combinations: 11 kinds in 7 looks. One contact sheet per kind, desktop app, 2026-11-22, early afternoon light (1.2.5):

KindSheet
Oceandocumentation/media/gallery/ocean_every_look.jpg
Shorelinedocumentation/media/gallery/shoreline_every_look.jpg
Lakedocumentation/media/gallery/lake_every_look.jpg
Ponddocumentation/media/gallery/pond_every_look.jpg
Swimming pooldocumentation/media/gallery/pool_every_look.jpg
Hot springdocumentation/media/gallery/hotspring_every_look.jpg
Riverdocumentation/media/gallery/river_every_look.jpg
Streamdocumentation/media/gallery/stream_every_look.jpg
Waterfalldocumentation/media/gallery/waterfall_every_look.jpg
Puddles and wet streetdocumentation/media/gallery/puddles_every_look.jpg
Underwater (from above)documentation/media/gallery/underwater_every_look.jpg

Earlier day, dusk and night sheets per kind are in documentation/media/kinds/.

Against the engine's old built-in ocean. The engine no longer ships its ocean, and ZeroMind no longer serves the old oceans package, so the two can no longer run side by side. They were compared live while both existed, in the same scene, same preset and same light: documentation/media/ocean_compare_builtin.jpg and ocean_compare_tidewater.jpg (day), ocean_dusk_builtin.jpg and ocean_dusk_tidewater.jpg, and compare_builtin_vs_tidewater_{day_1,sunset_1,sunset_2,night_1,night_2}.jpg (both seas in one frame, the built-in on the left). Wave heights matched the built-in exactly (see "Where the sea came from"); what changed is the light: no teal glow at dusk, a dark sea with a moon path at night, glowing crests. Today's sea in the showcase, after the 1.2.4 speed work, from just above the water: documentation/media/compare/tidewater_1_2_5_{day,dusk,night}.jpg. Nothing visible was lost: swell, crest foam, shore foam, sun glints, the dark dusk sea and the moonlit night sea are all still there.

Not shot yet: the same gallery in the desktop browser and on the tablet (app and browser). No browser session or tablet is connected to the editor this kit is built in.

Cost

How it is measured. The kit's own bench (tidewater.modules.costBench, the benchmark scene, or the pause menu's "Measure water cost on this device") builds each kind alone at an empty spot far from everything else, looks at it through a camera of its own, and compares the frame with the water against the same frame without it. Since 1.2.11 every cell reads two figures from the engine's own frame-cost meter (profiler cost): GPU, the GPU time the engine's own process spent a frame (gpu (own), read from the driver's per-process counters, drm_fdinfo on Linux), and CPU, the engine thread's CPU time a frame. Each is the frame with the water minus the same empty frame measured just before it (the empty-scene baseline), so a cell is what that kind adds. Every run is saved in documentation/costs/.

GPU per kind and quality tier, desktop (native desktop app, Linux, 1920 x 1080, dev build, 2026-11-22, two full runs of every kind at every tier: 12:01 and 12:17 UTC, files benchmark-native-202611221201UTC and benchmark-native-202611221217UTC). Run 1 / run 2, ms of GPU over the empty frame (which drew in 0.2 to 0.3 ms). The spread between runs on this machine is about 0.1 ms for a single surface and up to 0.4 ms for the shoreline, hot spring and underwater pass, so a negative cell is that noise, not a saving.

WaterLowMediumHighUltra
Ocean+0.80 / +1.11+0.65 / +0.73+1.20 / +1.18+2.02 / +2.13
Waterfall (sheet, spray, mist)+0.10 / +0.43+0.13 / +0.13+0.13 / +0.08+0.21 / +0.08
Underwater pass (camera under a lake)+0.09 / +0.02+0.02 / +0.19+0.35 / -0.13+0.23 / +0.14
River+0.10 / +0.05+0.11 / +0.06+0.07 / +0.04+0.04 / +0.05
Lake+0.07 / +0.08+0.06 / +0.05+0.07 / +0.04+0.05 / +0.05
Pond+0.07 / +0.04+0.03 / +0.06+0.02 / +0.04+0.03 / +0.04
Pool+0.07 / +0.05+0.03 / +0.06+0.03 / +0.05+0.04 / +0.05
Stream+0.06 / +0.06+0.08 / +0.05+0.05 / +0.05+0.05 / +0.05
Hot spring (steam)+0.05 / +0.06+0.05 / +0.03-0.37 / +0.11+0.04 / +0.12
Puddles (wet)-0.03 / +0.05+0.05 / +0.04+0.01 / -0.01+0.09 / -0.04
Shoreline+0.07 / -0.17+0.07 / +0.04-0.56 / +0.06+0.04 / -0.29
  • On this desktop GPU every kind but the ocean costs under about 0.1 ms of GPU, and the ocean 0.7 to 2.1 ms (its FFT, foam and surface passes), rising with its tier from medium to ultra.
  • CPU in the same runs (engine thread over the empty frame, run 1 / run 2): the ocean +0 to +11.8 ms depending on the round, the waterfall +2.7 to +10.3 ms (its spray and mist effect graphs run on the CPU), the hot spring +0 to +6.4 ms (steam), every other kind +0 to +4.5 ms. The machine ran several engine clients and agents at once, so CPU deltas under about 3 ms are inside its round-to-round noise; the files list every cell.
  • Whole frames (median wall time, both runs, every tier): the empty frame held the display's 60 Hz (16.5 to 17.8 ms). With one kind in it: lake, pond, pool, river, stream, puddles, shoreline and the underwater pass 16.1 to 19.0 ms (53 to 62 fps); the hot spring 18 to 22 ms; the waterfall 16 to 26 ms; the ocean 18 to 34 ms, with one ultra round at 83 ms. So on this machine the still and flowing surfaces stay at or near 60 fps, and the three kinds that run effect graphs or a wave simulation on the CPU do not.

Browser: not measured for this version. No browser client was reachable from the editor this kit is built in (zero client list shows only the desktop editor's own client and its headless helper), so the browser column for 1.2.11 is empty rather than guessed. The last browser figures are one owner's desktop Chrome run of 2026-11-15, before the 1.2.4 speed fixes (bare frame 48.5 ms with 20.4 ms of GPU; ocean +20.2 ms frame / +2.4 ms GPU, puddles +7.5 ms GPU, underwater +5.1 ms, lake and pool about +1.9 ms, others about 0), kept in documentation/costs/. The Android tablet (app and browser) is not measured either (engine #25931: the editor cannot reach an attached device). To fill these: open the world on the device, press Escape and choose "Measure water cost on this device"; the run saves itself to documentation/costs/.

What costs nothing (1.2.11).

  • No water, no work. The ripple field's loop and the underwater check start with the first water and end with the last; a scene with no Tidewater water runs no Tidewater task at all (checked with profiler tasks on an empty scene: none listed).
  • A still lake nobody is near does no per-frame Lua. WaterBody has no per-frame update: its own work (a changed field, the tide, the automatic splash listener, a sea following the weather) runs on a task four times a second, and a field written at runtime is taken on the next frame. The ripple field sleeps (looks again four times a second) while it is flat, dry and no bound water is within 250 m of the camera; a drop, rain or a new water wakes it at once. The underwater check runs every frame only while the camera is within 30 m of some water's box (or over an endless sea), and four times a second otherwise. Measured with a lake 560 m from the camera: the ripple task appeared in 2 of 18 one-frame samples and the underwater task in 3 (both about 0.05 to 0.1 ms when they run, so under 0.01 ms a frame on average), nothing else of Tidewater's; a drop beside the camera woke the field at once (60 steps in the next second).
  • A still sea costs nothing (since 1.1.9): in a paused editor, or a frame where neither the water clock nor the camera moved, the ocean skips its whole step and dispatches no GPU work.
  • Far effects rest. A waterfall's mist and spray and a hot spring's steam farther than 90 m from the camera stop emitting and are paused 10 s later (their effect graphs no longer run); they start again inside 75 m.
  • Garbage. Tidewater's own per-frame work allocates nothing in the showcase: the profiler's scripts and tasks columns read 0.0 KB for Buoyancy (29 floaters), Wake, the ripple field, the ocean step, the river, waterfall and lake tasks and the effects' tasks. What is left is engine-side: Physics.water answers a fresh table (1.2 KB with its vectors) and has no form that writes into ours, so the surface follow now keeps each hull's last sample in plain numbers and reads again only every 0.25 s on a sea (carried forward by the surface's rise speed, acceleration and slope in between, within a few millimetres on a swell) and only when the hull moves 0.3 m or the water is redefined on still water. In the showcase that is 45 reads a second for 25 near floaters, about 54 KB a second (under 1 KB a frame at 60 fps), where it was one read per floater per physics step before (about 50 a frame).

The showcase, the quiet scenes and 60 fps (native desktop app, Linux, 1920 x 1080, dev build, 2026-11-22 11:57 to 12:50 UTC, measured in play in the editor's own client with profiler cost, several 5 to 6 s windows each). This machine ran several engine clients and agents beside it, and the engine thread moved between performance and efficiency cores, which alone swings a frame by tens of percent:

SceneFrames a secondEngine CPU a frameGPU (own) a frameTidewater's own share
Empty scene (no water)37 to 5912 to 26 ms0.2 to 0.3 msnone
One still lake, nobody near55 to 5912.0 to 13.2 ms0.2 msunder 0.01 ms a frame
One lake beside the camera49 to 5912.5 to 12.9 ms0.2 msripple field 0.1 ms
Benchmark, one still or flowing surface53 to 62 (frame held to 60 Hz)see the CPU note abovesee the GPU tablethe kind alone
Benchmark, one ocean, waterfall or hot spring29 to 56see the CPU note abovesee the GPU tablethe kind alone
Lakeside45 to 57 (22 to 30 while the machine was busier)14.5 to 20 ms0.2 to 3 msabout 0.5 ms
Gallery (77 waters)9 to 1258 to 70 ms6.3 msabout 5 ms
Showcase7.7 to 13.469 to 114 ms2 to 18 msabout 2 to 5 ms
  • Quiet scenes are held back by the machine, not the water. With the engine on performance cores Lakeside's host-bound rate was 69 fps; on efficiency cores 50. The empty scene itself ran at 37 to 59 fps here. Tidewater's share of a Lakeside frame is about 0.5 ms (ripple field, effects watcher, wake, five floaters).
  • The showcase does not reach 60 fps on this machine, and Tidewater is a small part of why. Per frame: physics 12 to 16 ms (the engine's water forces on 29 floaters against the sea's wave grid, plus the solver), the sky-visibility task 4 to 16 ms, rendering 15 to 30 ms (tail_finish), effect graphs about 5 ms, the island's 252 props and the forest dressing, garbage collection about 4 ms. Tidewater's own: the ocean step 0.6 to 0.9 ms, Buoyancy 0.5 to 3 ms, ripples, wake and effects about 0.5 ms. Since 1.2.10 the physics catch-up is capped at two steps a frame (physics.max_catch_up_seconds = 0.034), which ended the spiral that made slow frames slower.
  • The gallery (77 waters on screen) is the heaviest scene: the effect graphs of its waterfalls and hot springs (about 35 ms of CPU and MBs of garbage a frame, engine issue 01M80B3VZP1AQR343JKBWDTTBV: an effect play runs its graph every frame whether or not it emits) and rendering. The far-effects rest above was added for it; it was measured working (79 of 105 emitters rested) but the machine was too loaded during that run (40 to 50% of the time waiting for a core) for a fair before/after frame rate.

Earlier measurements. The tables of 1.1.x to 1.2.10 (whole-frame and CPU deltas, the renderer-tier runs, the 2026-11-16 showcase timings and the first benchmark of 2026-11-22 04:44) are in documentation/costs/ with the date of each run. They predate the GPU column and the no-work-without-water changes; this section replaces them.

Where the sea came from

The Zero engine no longer ships an ocean of its own: Tidewater is the water, and its components are tidewater.components.WaterBody, tidewater.components.Ocean and tidewater.components.Buoyancy. Tidewater's spectral sea started as a port of the engine's old built-in oceans package (the spectral sea, its foam, its seabed, things floating on it, its nine sea presets and its tests) and keeps all of it. A world written for the old package moves over by installing Tidewater and changing its require (rebuild the scene after, so a sea it already made is made again):

local Ocean = require("tidewater.modules.ocean")

or, better, by replacing that sea with a WaterBody of kind = "ocean" (its preset takes the same sea states), which adds the seven looks, the tide, the shared underwater view and the light fix.

History: the same sea, on screen and in cost. While the old package still shipped, both were measured side by side. A sea attached through Ocean.attach or the Ocean component with no tidewater option was drawn exactly as the built-in package drew it, and cost what it cost: Tidewater carries the built-in package's two last savings. A sea nothing moves costs nothing (the waves are evolved only when the moment drawn changes, the surface is re-placed only when the viewer moves, a frame on which neither happened dispatches no GPU work at all, and a paused editor's sea holds still), and the surface reads the scene behind it straight from the engine's own zero::scene_color and zero::scene_depth instead of copying the lit scene into textures of its own every frame. Tidewater adds one saving of its own on top: the surface mesh is no longer re-mirrored from the GPU every frame. Add tidewater = true to Ocean.attach (or use WaterBody with kind = "ocean", which always has it) for Tidewater's light fix: lit by the real sky, no teal glow at dusk, dark with a moon path at night, glowing crests. The waves were the same: with the same preset, Physics.water heights matched the built-in sea exactly (a gale at high quality: RMS 13.38 m, 1% of points under -31.2 m, 1% over 28.6 m, on both). The two packages also ran side by side in one world, each sea alive and moving: Tidewater names its bodies of water, GPU resources and surface markers twocean<N>_..., where the built-in package used ocean<N>_... (documentation/media/compare_builtin_vs_tidewater_*.jpg: built-in on the left, a Tidewater tile on the right, at day, sunset and night). Everything else new (looks, bounded seas, wake foam, foam against piers, the moon path, tides) is opt-in.

What's new in 1.1.13

  • Water effects cost nothing while parked or warming (tidewaterFx 1.0.10): the splash and mist loops a water body primes and parks far below the world (y -5000) used to keep simulating every frame; they are now paused until used, and the first real splash still shows at once.

What's new in 1.1.12

  • Clearer river docs (issue #11): the how-to guide's river section says where the water lies (its own bed, the component's ground field, or a channel of your own with options = '{"bed":false}'), that bed, groundOffset and the bank and rapids settings go in options, and that path is a string (with a sample that joins a Luau table). The path and ground field descriptions say the same. Contributed through lanternStair PR #6.
  • Built on the current engine library (33551d3).

Guides inside

  • How to add water to my game: every kind, looks, varieties, floating, tides, queries, performance.
  • How to add an ocean with waves breaking on the shore, How to add a lake or pond, How to add a river that carries things downstream, How to add a waterfall with spray and mist, How to add a swimming pool or hot spring, How to add puddles that fill when it rains, How to add a tide that comes in and goes out: one kind or feature each, with copy-paste code.
  • How to make a boat float: vehiclesKit boats on Tidewater, and your own hull with Buoyancy.
  • How to change the look of water: the seven looks and every named variety.
  • How to make water run well on phones and tablets: the quality field, Water.setQuality, battery.
  • Example: build a small harbour level: a harbour sea with a tide, a pier, boats, floating crates and buoys, a river over a waterfall, swimming and rain.
  • Example: a fishing dock on a lake with a boat: from an empty world to a lake you can row on.
  • Oceans: the sea in depth, covering sea states, what each control does, the seabed, buoyancy, cost.
  • Swimming is the tidewaterSwim package's guide, How to let the player swim.

Credits

Tidewater's sea is built on the Zero engine's former built-in oceans package (@builtin::systems.oceans, by the Zero engine team, which the engine no longer ships): its spectral wave simulation, cascades and Gerstner swell, Jacobian foam, Beer-Lambert water colour, procedural seabed and caustics, buoyancy, sea presets and test suites are that package's work, carried here as the starting point and extended. Its later savings are carried over too, with thanks to the same team: "a sea nothing moves costs nothing" (evolve only when the moment changes, re-place only when the viewer moves, a paused editor's sea holds still) and reading the scene behind the water through the engine's own zero::scene_color and zero::scene_depth rather than a copy of its own. Thank you.

The parts

PartWhat it is
components/WaterBodyAny kind of water, saved with the scene: kind, look, preset and its shape
modules/waterThe one API: create / attach / setKind / setLook, presets, heightAt, flowAt, normalAt, surfaceAt, tideAt, sample, setQuality, ripple, splash, setWeather
modules/looksThe seven looks as shader parameters
modules/tideThe tide: a water's level rising and falling on the shared water clock
modules/kind_*One builder per kind (ocean, shoreline, lake, pond, pool, hotspring, river, stream, waterfall, puddles, underwater)
modules/fx, modules/ripples, modules/weatherLinkOne-line bridges to tidewaterFx (effects, the GPU ripple field, weather)
modules/underwaterThe view from below the surface, for every kind
components/Ocean, components/Buoyancy, modules/ocean*, modules/buoyancyThe spectral sea and floating (started as a port of the engine's old built-in oceans package)
shaders/*, shaderModules/twCommon, computeShaders/*The water surfaces, the shared shading library, the GPU passes
scenes/*Ready-made scenes and the gallery
tests/*ocean, buoyancy, oceanLooks, underwater, surfaces, rivers

Known limits

Honest list, as of this version. Where the cause is in the engine, the engine's issue number is given as engine #NNNNN; those are the numbers to look up and follow. Where this world's own issue tracker also follows it, its number is given as (world tracker #N).

  • An effect played before the kit has readied it shows late: engine #26227. A new effect play draws nothing until a long hidden warm-up through its whole graph finishes. Tidewater readies every effect in the background as soon as a water is built (Fx.prime): measured on a busy desktop, every one-shot was ready 0 to 8 s after the water was built and every continuous effect (mist, bubbles, drips, foam, spindrift, bow spray) 30 to 38 s after. From then on every effect draws within 0.05 s of being triggered, the first time and every time after (all 13 kinds measured, twice). An effect triggered in the first seconds after load, before that, waits for the engine's warm-up: on the same desktop more than 8 s. Call Fx.prime(look) at load, behind a loading screen if you can, for a look of your own. (world tracker #1)
  • Stopping an endless effect does not hand it back for reuse: engine #26226. Tidewater works around it: a stopped mist, drips, bubbles, foam, spindrift or bow spray is parked (its emission turned to zero) and the next one of its kind and look takes it over at once. (world tracker #2)
  • After a shader edit, existing materials and pooled effects keep the old shader: engine #26228. Rebuild the water (reload the scene, once it has finished loading) to see a change.
  • Reloading a scene while it is still loading never returns: engine #26225. Let a ready-made scene finish loading (the showcase takes up to a minute) before reloading it.
  • The ocean's top quality foam is over a GPU size limit: engine #9336. At ultra the foam texture is larger than some GPUs allow; high and below are not affected.
  • Opening a scene with no edits makes a clean world look changed: engine #26351. Opening a ready-made scene can write an empty record into it; zm restore <scene> takes it back.
  • Publishing a one-file change in a world with many kits takes minutes and freezes the editor: engine #25764. Expect this when you push a world that installs Tidewater beside other kits.
  • A helper editor session doing scene work grows 2 to 3 GB in an hour: engine #26230. On a long session with the showcase open, restart helper clients now and then.
  • Effects only move in Play. The engine runs effect timelines on the gameplay clock, so splashes, mist and spray stand still while editing; water surfaces, ripples and waves do animate in the editor. (world tracker #3)
  • The ready-made scenes are a separate install (Tidewater Scenes), since they bring other kits' terrain, props and materials. Tidewater alone is about 1,100 files and installs in about 10 seconds in an empty world (measured 2026-11-22). (world tracker #4)
  • Ripple rings are drawn within 64 m of the camera; a splash's own ring particles still show further out. (world tracker #5)
  • Very shallow lagoon water over pale sand reads too bright at night; the open sea goes dark with a moon path. (world tracker #6)
  • The ocean's ground option (shoaling against a terrain) can leave a lip of raised water on a very steep coast. Leave ground empty if you see one. (world tracker #7)
  • A faint green fleck can show on near wave crests with a very low sun, inherited from the old built-in sea it was ported from; the low-poly ocean has no moon glint at night. (world tracker #8)
  • No longer applies: a scene running both seas could look milky. While the engine still shipped its own sea, a camera low enough to dip under the built-in swell had that package's underwater fog wash the whole frame, Tidewater's sea included, to a pale teal (measured alone at noon from the same camera, the two seas matched). The engine ships no sea of its own now, so a world cannot run both. (world tracker #9)
  • The Android tablet cost is not measured on a device yet: engine #25931. A tablet is attached, but it was in use by another project, and the editor has no way to reach an attached device at all. Desktop and browser are measured, and the pause menu's bench fills the gap in one run on the tablet (see Cost). (world tracker #10)
  • The gallery's small ocean tile reads flat (a stepped cyan slab in its 20 m box at day and dusk), unlike the open sea, which reads as water in every light (documentation/media/kinds/ r8_kinds_{day,dusk,night}_{1,2}.jpg: every kind in the realistic look, checked twice at each time). A bounded ocean wants room: give it 100 m or more.
  • At night the sea mirrors your scene's sky, so a sky that stays lit after dark gives a pale, milky night sea. The engine's procedural sky still renders a light grey after midnight, and a day-night clock may hand over to a bright moon (worldClockKit's is 0.65, a sixth of noon). The showcase eases its sky exposure to 0.15 and its moon and ambient to 0.15 and 0.07 through twilight (its entrypoint.luau, holdSky), which takes the sea at 22:30 from a pale cyan (brightness 134 of 255) to a dark moonlit blue (69): documentation/media/playtest/r8_sea_night_2.jpg and r8_sea_dusk_2.jpg. Do the same in your own scene if its nights read milky.
  • A scene rebuilt during play can drop a boat another player owns on the client that rebuilt; leaving and re-entering play brings it back.
  • Not every ready-made scene was re-checked by eye in this version. The lagoon, the gale and the rainy street were rebuilt and looked at; the forest river, mountain lake and waterfall grotto load and run, but were not re-captured after their last changes.