Sunday, February 9, 2014

iOS: Designing Particles with CAEmitterLayer / CAEmitterCells

Since iOS5, iOS incorporates an easy way to create particles in your app.

This is good news, since we no longer need to delve into the complicated world of
OpenGLES or cocos2d or other engine.

However, hard coding particles can be a pain since there are quite many parameters
to play with. I wanted to incorporate this particle system into my old game - Blast The Droids,
and while playing with it, I find I am stuck in the "change one parameter, and execute" loop.
It takes hours(!) to design a simple explosion.

What if, there is a way to play with the CAEmitter particle VISUALLY, and then get the code
instantly? Well, now there is! Cause I make an app for this purpose. :D As normal, I make apps
because I want to use it myself XD

The app is initially designed for iPad only because it is easier to design in larger screen, but it is a Universal App so you can use it in iPhone/iPod Touches as well!
This way you can be in a train, at lunch, or anywhere and design your own particle system,
get the code and implement it whenever you want.

I added multiple export options:
1. Copy to clipboard
2. Post to (u need internet)
3. Email the code.
4. Save code as txtfile and import in iTunes.

There are also 2 types of codes available - init code, or modifier code. Init code is what you specify when you init the particle (inital condition). And the modifier code basically is to be placed in a method that triggered by user actions.

Here is the Demo Video showcasing the ability of the app:

For testing purposes, you can download an app template made for this app:

As of this blog post date, the app is under review by Apple.
EDIT: The app is APPROVED! You can get it here: GET PARTICLE-X IN App Store!

Do you have any questions? Requests? Post it in the comments sections or just email me.

No comments:

Post a Comment