Log inGet started
Package

tidewater.package

This package holds more than this page lists. See all of its files in its world.

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, and so do the material packages its ready-made scenes use (groundMaterials, woodsMaterials, stoneMaterials, organicMaterials, materialLibraryKit): in an empty world the install takes about two minutes (about 18,000 files).
  2. Add the sea. A brand-new world has no scene yet: make one first (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.

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, 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 over dryTime (90 s by default) after the rain stops, even when a weather kit leaves its wetness at 1. A dry street declares no water and draws nothing. Pictures of the same street wet and dry are in documentation/media/ (puddles_wet.jpg, puddles_dried.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 rings its water in the rain from any weather kit that writes the named values weather.rain, weather.wetness and weather.wind on an entity. Cloudburst does, so its raindrops ring your lakes and puddles with no wiring and no dependency either way. Without a weather kit: Water.setWeather({ rain = 0.6 }). Any kit can make rings and splashes: 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).

Ready-made scenes

tidewater.scenes.*: tropicalLagoon, northernGale, mountainLakeDawn, forestRiver, rainyStreet, waterfallGrotto, and gallery (all 77 kinds and looks, labelled, with walkways; Gallery.setTime("dawn" | "day" | "dusk" | "night") relights it).

Cost

Measured with the kit's own bench (tidewater.modules.costBench, also the pause menu's "Measure water cost on this device"). It builds each kind at an empty spot far from the scene, looks at it through its own camera, and takes the median of rounds of water off against water on. Each run is saved in documentation/costs/. A delta smaller than about 2 ms is lost in the frame's own noise and reads as "about 0".

WaterDesktop, native (frame / GPU)Browser, desktop Chrome (frame / GPU)Android tablet
Ocean (default quality)+22.9 ms (second run +25.2) / +5.3 ms+20.21 ms / +2.37 msnot measured
Lakeabout 0 / +1.2 ms+1.93 msnot measured
Swimming poolabout 0+1.94 msnot measured
Riverabout 0+0.62 msnot measured
Underwater pass+3.8 ms (second run +8.8)+5.13 msnot measured
Puddlesabout 0GPU +7.46 msnot measured
Waterfall+6.5 msabout 0not measured
Hot spring+3.6 msabout 0not measured
Pondabout 0 / +0.3 msabout 0not measured
Shoreline, streamabout 0about 0not measured
  • Desktop, native: Linux, 1920 x 1080, dev build, runs of 2026-11-15 22:40 and 23:34 UTC, on a machine running two or three engine clients at once (a frame was already 30 to 90 ms before any water).
  • Browser: desktop Chrome, measured by the world's owner with the same bench (60 frames, 2 rounds); the bare frame was 48.52 ms with 20.42 ms of GPU.
  • Android tablet: not measured on a device yet. A tablet is attached to the machine this kit is built on, but another project was using it, and from inside the editor there is no way to reach an attached device at all: engine #25931. So the column stays empty rather than guessed. Open the world on the tablet, press Escape and choose "Measure water cost on this device"; the run saves itself beside the others in documentation/costs/ and fills this column. A desktop stand-in was tried (the whole bench under the engine's low quality tier, the defaults a 4 GB tablet draws with: Bench.run({ tier = "low" }), runs of 2026-11-16 in documentation/costs/), but on a desktop shared by two engine clients the bare frame swung from 100 to 200 ms between rounds, so its per-kind deltas are noise and are not quoted here. What carries over to a tablet is the shape: the ocean is the one kind with real fixed work (its FFT and surface passes), and since this version that work stops entirely whenever nothing moves; puddles and the underwater pass are full-screen GPU work that scales with the tablet's lower render resolution; every other kind is one transparent surface. For a phone or tablet pick lakes, ponds, pools, rivers, streams and shorelines freely, keep one ocean at quality = "low", and use puddles and underwater where they matter.

1.2.0 runs, twice at each tier (native desktop, Linux, 2026-11-21 19:15 UTC, 120 frames a side, 3 rounds; the bare frame was already 20 to 22 ms because the editor, the owner's client and a sub-client shared one GPU, and this machine gave no GPU timestamps that day, so these are frame-time deltas only):

WaterHigh tier, run 1 / run 2Low tier (the tablet defaults), run 1 / run 2
Ocean+7.9 / +1.0 ms+8.0 / +3.2 ms
Underwater pass+5.9 / about 0+2.9 / about 0
River+5.0 / about 0+0.9 / about 0
Puddles+3.1 / about 0about 0 / about 0
Stream+2.6 / +1.2 ms+3.4 / +0.9 ms
Lake, pond, pool, shoreline, hot spring, waterfallunder 2.5 ms in every run, mostly about 0under 3.2 ms in every run, mostly about 0

The ocean is again the one kind whose cost shows in both runs; everything else moves between "about 0" and a couple of milliseconds from one run to the next, which is this machine's noise. The tablet column above still needs a device: no phone or tablet was connected to this editor during the 1.2.0 work, so the tablet costs, the browser-on-tablet costs and the ten-minute battery-saver run on a tablet were not measured. The bench and the pause-menu entry are there to take them on the device.

Battery saver. With the Graphics Presets kit installed, its Battery Saver and Low steps put every auto water on the low tier by themselves (Water.setQuality("batterySaver") does the same without the kit); a still lake or pond costs a single transparent surface, and a sea that nothing moves skips its whole step.

Most of the ocean's frame time is its CPU side (the clipmap and the wave spectrum's bookkeeping), which is why it costs far more frame time than GPU time.

A still sea costs nothing (1.1.9). In a paused editor, or in any frame where neither the water clock nor the camera moved, the ocean now skips its whole step: measured on the main scene with the editor paused, 175 skipped steps in 3 s and not one GPU dispatch. When only the camera moves it re-places the surface from the waves it already has, without re-running the wave simulation. The ocean also no longer copies the lit scene into textures of its own every frame (it reads the engine's zero::scene_color / zero::scene_depth) and no longer re-mirrors its surface mesh every frame. The table above predates these savings; they were carried over from the engine's old built-in oceans package (see Where the sea came from).

The showcase, measured (native desktop, 1920 x 1080, 2026-11-16 about 01:15 UTC, a busy machine with two engine clients):

  • In the editor with the showcase open: median 49.8 ms a frame, 95th percentile 58.6 ms, 99th 80.1 ms. Under 100 ms throughout.
  • Playing it (on the pier, after it finished loading): median 40.6 to 47.6 ms, but 95th percentile 144 ms and 99th 296 ms. The GPU's timed work in play was about 79 ms a frame at the median, mostly an engine compute group (29 ms), the transparent pass (21 ms, where water surfaces and particles draw) and the engine's weather surface pass (12 ms); Tidewater's own ocean passes were each under 1 ms. A player on a busy machine sees those spikes, as the world's owner did (155 to 210 ms a frame).

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 install is large: about 18,000 files and a minute, mostly material and prop libraries the ready-made scenes use. The water itself needs none of them. (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.