Get Updates By E-mail 

Subscriber Counter
Article Written By:
Johann Dowa

How To Make Realistic Water Ripples With Cocos2D (Very Impressive)

In the past I have mentioned some great tutorials and libraries using Cocos2D classes to produce different  effects like this CCRenderTexture tutorial showing cool things you can do with sprite masking and this class for an easy Cocos2D lightning effect.

This latest effects example is really cool, showing you how to make an ultra-realistic water ripple effect just like in the different top-notch aquarium apps.

This example is from Birkenmose, a member of the Cocos2D forum.   They have posted a “RippleSprite” class which works very much like a CCSPrite and with just a few lines of code you can add this ripple effect to an image.

Birkenmose has also done an excellent job of explaining everything that is going on in the code with his comments which is of great help.

Here’s a video showing the code in action:

You can read the original thread on the Cocos2D forum here.

UPDATE: The original author has now added a demo project – you can find it here:
You may have to copy/paste the link if it doesn’t work.

Another forum member, Clarus, has posted a working project using the code that you can find here.

Definitely a thread to watch and the effect is still being further optimized/enhanced and hopefully Birkemose is able to figure out Github soon :)

Thanks to Marin from Touch Code Magazine for pointing me to the thread.

If you’ve always wondered how this is done this is some great code to check out.

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.