Simple computational fluid dynamics solver in #quadplay, the retro fantasy console. I'll release as a source sample in the next update. This was quite an optimization puzzle to get running at 60 Hz.

I make little doodles like this as examples and then tend bootstrap game jam projects with them. This one is going in the other direction. It is based on code from a game jam 10 years ago, where it ran in a pixel shader at massive resolution.

Top down shot is by Andrew Thomas, https://www.flickr.com/photos/andrew_thomas_73/albums/72157663694252060 I need to get a copyright-clean one before I distribute.
DJI Phantom 3 also the Mavic pro

All photos taken with the Dji Phantom3 aerial uav/drone....

Flickr
@morgan3d May I ask how does it work? At first glance looks like wave equation with wave speed proportional to depth or something like that.

@lisyarus It is a Verlet integrator for Navier-Stokes equations, which is a fancy way of saying a simple hack like the Game of Life for distributing energy. This is a classic demoscene hack.

I originally modeled the wind waves that way but it was too hard to get the constants stable for parameterized wind speed and direction. So, I compute the wind waves analytically using the water depth to create refraction.

@morgan3d Thanks! Are there any resources on that classic demoscene hack? :)
2D Water

@morgan3d Thank you a lot!
@lisyarus Another open source analytic wave generator I wrote is here: https://www.shadertoy.com/view/lt3XDM

@morgan3d @lisyarus runs at about 40fps on my iPhone 14!

@morgan3d @lisyarus

this beautiful image hits me straight in the nostalgia by giving me twinsen’s little big adventure vibes

@morgan3d Yeah, judging by the code it's solving the wave equation (https://en.wikipedia.org/wiki/Wave_equation) which IIRC can be derived from Navier-Stokes as an approximation to surface waves (maybe through the shallow water equation).

I did a similar thing here, although it doesn't have water-like rendering, and uses explicit Euler instead of Verlet (i.e. stores height & velocity per cell): https://lisyarus.github.io/webgl/waves.html

Wave equation - Wikipedia

@morgan3d @lisyarus I’ve never heard finite difference methods for hyperbolic pdes described as a Game of Life hack but I can totally see that, lol.
@morgan3d There's a really lovely surreal quality to this.
@morgan3d This is almost as beautiful as the real thing! 😱 Great job!
@morgan3d Wow, this is gorgeous! 🤩👌
(I'm sure it'll still look great with whichever image you settle on)
@morgan3d this looks sooo cool.