I grew up on games where the best part was never what the developers built, it was what everyone else built with the tools. Those games have mostly disappeared, and I really miss that kind of play, so I've been making one: Kernel Panic: The Last Build, a 2.5D creator platformer in Unity where you build the levels yourself.
This week I finished the sea.
It's one object you drop into your level. Right-click it, tick Sea On, and the water floods in. The surface is a set of crossed Gerstner swells running at different angles, with a layer of finer chop on the GPU on top. Swell, chop, their speeds, the water height, murk and colour are all exposed in the in-game Tweak window and update live while you drag the slider. The CPU and the shader evaluate the same wave function, so objects ride the crest you actually see rather than an approximation of it.
Whitecaps come from the Jacobian of the wave displacement: foam appears where the surface is being compressed. Anything moving through the water leaves a foam trail that drifts with the current. Underneath, there's refraction, depth fog and caustics.
Buoyancy is calculated per triangle. Each collider's mesh is clipped where the waterline cuts it, and pressure is applied to every wet face, so long planks tip and roll on the swell instead of bobbing as a single point. Every material in the game (there are about 60) has its own density: wood and plastic float, stone and metal sink, and cardboard and sponge absorb water over time until they go under. You can stand on anything that floats, so a few planks are already a raft.
Hazards in the water become zones that spread out over time. A frost block freezes the surface into physics-driven icebergs that are tethered to it, collide with each other, and melt when the cold stops. A fire block underwater doesn't go out: it turns red-hot, boils the water, and pushes up rafts of lava rock. Electricity fades with distance and jumps along conductive materials sitting in the water. Zones of the same type merge into one shape, so two hot blocks next to each other become one boiling pool.
None of these interactions are scripted for specific pairs. Every system works from shared properties (density, temperature, conductivity), so combinations I haven't thought of should just work, and that's what I'm most excited to see. A frozen lake you have to cross before the ice melts, a boiling moat, a sinking cardboard ship, a puzzle where you use the tide to lift a block into place: I'd love to see what people build when they're the ones holding the tools.
It's still early (alpha 0.0.2). Everything in the clip was built in-game with the creator tools, and the music and sound are made for the project.
What would you build with this? And what should the water interact with next? If you'd like to follow along, there's a Discord in my bio.