Spielerando

Simulate a lively water surface that settles down and never explodes

A row of water columns that react to drops and splashes looks great until a low frame rate or a strong splash makes the whole surface shoot to the sky. And a surface that slowly loses or gains water gives the wrong level in the end. Here is a stable step with a clear limit, and a way to keep the total volume.

Why this works

Each point of water is pulled toward the average of its neighbours and carries on moving, which is all a wave is. It stays calm only if a wave never skips a whole column per step, and nothing leaks if the edges count as closed.

When not to use it

Not when the water must carry things realistically, flow downhill or splash into the air. A surface made of columns only moves up and down, so use drawn effects or particles for those cases.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 41 lines of example code with 5 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Simulate a lively water surface that settles down and never explodes" (read_entry pond-surface-waves-that-do-not-blow-up-and-keep-the-water) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP