Hello guys, I am new to game dev and I am trying to make a project while I learn, right now I want to make a 2d platformer game, in this stage I am programming the enviroment: things like platforms, water and trees. I am trying to make water like the one in new super mario bross Let's Play New Super Mario Bros. Wii - Part 9: Water Land - YouTube, it makes waves and reacts when something falls into it.
I found an algorithm that comes close to what I want physics - How do I create 2D water with dynamic waves? - Game Development Stack Exchange, my problem is not the algorithm but how and where to implement it.
What is the best way to acomplish this? is it making a texture, adding it to a material and updating it every tick? or is it deforming a mesh? I would appreciate any input and if you have any code examples the better.