Infinite Ocean v1.4.0 | An open source, endless, scriptable ocean module, plus a Studio plugin to set it up


Documentation | Module source (MIT) | Showcase place | Studio plugin | Discord

showcase-main

v1.4.0 - performance update
The waves are now drawn in parallel on Actors, the physics starts before the meshes finish building, and far water updates less often.

Infinite Ocean is an open source ocean for Roblox. One ModuleScript draws an endless, animated sea on a skinned EditableMesh that follows the camera, and runs the same wave function on the server. Boats float, characters swim and water events fire on exactly the surface players see, and only the settings ever replicate.

It is just the ocean: no lighting, no weather effects. It exposes an API so your own systems can drive the sea state.

The module is MIT. Read it, modify it, ship it in your game.


The module

local Ocean = require(game.ReplicatedStorage.Ocean)
Ocean.Init() -- once per side

-- server: a storm rolls in over 30 seconds
Ocean:CreateWeather("Storm", Ocean.Presets.Ocean["Pirate Seas"])
Ocean:SetWeather("Storm", 30)

-- a disc of ocean with its own weather, blended in across its rim
Ocean:CreateZone("Bay", { Position = Vector3.new(0, 0, 2000), Radius = 800, Weather = "Island" })

-- anywhere: where is the water?
local y = Ocean:GetHeight(position)
local normal = Ocean:GetSurfaceNormal(position)
local under = Ocean:IsUnderWater(position)

Ocean.EnteredWater:Connect(function(instance) end)
Ocean.WentUnderWater:Connect(function(instance) end)
  • Infinite and animated. Six Gerstner waves, crest foam, a translucent surface film, an underwater tint and a flat horizon out to your render distance. No seams, no tiling, no water part to resize.
  • Physics that match the visuals. Buoyancy, swimming and water events sample the same deterministic wave function on the server, timed on workspace:GetServerTimeNow(), so nothing drifts between clients.
  • Weather and zones. Named sets of waves and colours that cross-fade over seconds, for the whole sea or for a disc of it.
  • Tags, not code. OceanFloat floats a part, OceanObstacle calms the water around an island or pier, OceanDry keeps water out of a submarine, OceanTrack only reports events, OceanZone gives an area its own sea.
    .
  • Every setting is an attribute on the module, so Ocean:SetAttribute("WaveHeight", 1.4) on the server is all a day/night or difficulty system needs.
  • Built for frame rate. Bones move instead of mesh rewrites, the drawing runs in parallel on Actors, and streaming a new area costs tens of milliseconds, not a second.

EditableMesh must be allowed in your Experience Settings to draw the waves in a published game.

ship-storm


The hard part is the setup

An ocean is a lot of numbers: six waves, steepness, foam, colours, film, fog, sun, sky. Getting them to look right, then to feel right under a boat, then to match the lighting, means a lot of trial and error in a script.

So I built a Studio plugin on top of the module. It does not change how the module works. It is a panel that edits the same attributes, live, in Edit mode, so you can see the sea while you tune it.

  • Install in one press, or run the Quick Start: pick a physics, a look and your addons, and the ocean is there.
  • Live Edit-mode preview. Every slider and colour drag updates the sea, and each is one Ctrl+Z.
  • Presets. Oceans (Island, Pirate Seas, Oil Rig, Great Flood, Blank) that also set Lighting and Atmosphere, physics (Calm, Rough, Huge, Tsunami, Still) and looks (Classic, Cartoony, Stylized, Realistic). Save current makes your own.
  • Float, obstacle and zone tools. Make hull for selected boat sizes an invisible hull to your ship, and the Tags section tags, untags and selects the parts for each behaviour.
  • Optional addons: Buoyancy, Swimming, Drowning, WaterSplash, Ambience, Weather (rain, lightning, thunder), DayCycle, Zones, DevTools.
  • A dev menu in playtests: fps and mesh stats, weather and zone buttons, spawnable test floats and a water-event log.
  • Safe in Team Create. The preview lives under the Camera and never writes to the workspace or Lighting.

The plugin is a paid product on the Creator Store. The module is not: you can use it without the plugin and set the attributes yourself.

Get the plugin


Examples

Pirate ship in a storm

Hull parts tagged OceanFloat (or Make hull for selected boat). It rides the swell, rolls with it, and the Weather addon brings rain, lightning and thunder.
deck-weather
ship-bobbing

Presets

The same boat under four of the ocean presets.




Submarines and zones

A hull tagged OceanFloat with its interior tagged OceanDry floats with a dry inside. A part tagged OceanZone gives a bay its own waves, colours and Lighting, cross-faded at the rim.


Get Started

With the plugin: open the Ocean panel, press Install (or Dynamic Ocean for the Quick Start), tag an island OceanObstacle, tag a boat hull OceanFloat, press Play.

Without it: the module is on Wally as kashtheking/ocean, or copy it from the source into ReplicatedStorage.Ocean and call Ocean.Init() on the server and the client.

The tutorial goes from an empty baseplate to an island, a boat, swimming and a scripted storm.


Documentation


Credits

Big thanks to:


License

The Ocean module (ReplicatedStorage.Ocean) is MIT: modify and distribute it freely, keep the notice.
The Studio plugin and its addons are proprietary: use them in your own experiences, commercial ones included, but do not share, redistribute or re-sell them.


Final

I will read every reply, and bug reports go fastest on Discord. Include the plugin version (top of the panel), your preset, and whether it happens in the Edit preview, a playtest or a live game.

That’s all, enjoy the sea! :ocean:

20 Likes

Maybe this’ll help bring more sea/pirate games to Roblox

2 Likes

very cool stuff kash my king

maybe WE will make sea of thieves now

1 Like

Looks amazing, but $9 is a lot for a AI plugin. Can you at least lower the price or add a way to pay for it with Robux?

Honestly though, it should probably just be free atp

1 Like

The module is open source and free, you don’t need the plugin to use it.