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.

@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