I am trying to create a 2d water effect similar to what is in Tiny Wings (latest version). If you go to settings from the main menu you will see the water effect I am referring to.
What’s is the best way to implement a similar effect in cocos2d? Any links, books, code snippets will be helpful. This effect does not require any physics simulation. I.e. not using box2d…etc. it seems to be simulating water wave effect by drawing lines. However what would be an algorithm for determining the position of vertices at each frame?
Thanks
You could have a look at cocos2d effects, among them you will find effects like water, liquid and so on.
In cocos2d distribution, you will also find a test sample which will let you experiment a bit.
One thing to take into account is that those effects are quite cpu-consuming. So, I developed an “optimized” version that is not cpu-intensive and in some cases works better. You can find it on my github. This version is optimized to sprites not containing any children, but I developed it for a particular case, so it might be not as general as cocos2d own implementation.