WaterNode: simpe and ready-to-use 2d water effect

Hello!

In my latest project I’ve been experimenting with 2d water surfaces and I successfully ported a quite old github repository from objC to C++, using cocos2dx 3.9.

I was really pleased with the result and I decided to create a repo on github myself so everybody can use my custom Node if it pleases them.

Here’s the repo https://github.com/davidejones88/cocos2dx-WaterNode

And here’s the final result:

All you need to do is include my classes and create the node with

WaterNode *water = WaterNode::create();
addChild(water);

and you can make the surface move calling

WaterNode::splash(float x, float speed)

Have fun! :smile:

Davide

2 Likes

Thanks! I am having fun.

This is really good - there’ve been a couple of requests in the past for this sort of thing - so it’s good of you to share!

Maybe send a PR to cocos2d-x?