Featured iPhone Development Resources iOS Development Libraries

Cocos2D iPhone and Cocos2D-X Ninja Finger Slice Example Source Code

In the past I’ve mentioned some excellent libraries for creating special effects with Cocos2D with many featured in a massive Cocos2D  example code listing, and this great example of how to create realistic water ripples.

There are many apps in which a trail is drawn following the motion of a user’s finger on the iPhone and iPad screen.

With a few tweaks games such as Sushi Chop, Veggie Samurai, and Fruit Ninja were able with a few tweaks to the width and some smoothing turn this simple effect into a sword slashing effect.

Recently I came across a library that allows you to easily recreate this effect using Cocos2D (versions provided using Cocos2D-iPhone and Cocos2D-X).

The library is known as CCBlade and you can see the Cocos2D-X version of this library in action in the game Rolly Poly:

You can download the Cocos2D iPhone version of the library complete with an example project on Github here.

You can find the Cocos2D-X version ported by the creator of the Rolly Poly game here.

If you are thinking of creating a slicer game with Cocos2D be sure to keep this library in mind.

[via @iurdium]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.