[cocos2d] Using Particles
In this post i'm show how to create a simple particle effects using cocos2d and Particle Designer app.
Particle Designer is a software produced by 71Squared, with him you can create a visual effects for games, you can buy for only US$7,99.
That's a simple way to use a Particle Designer:
1 - Double click for select a effect
2 - Configure a effect attributes (image2)
3 - Save with plist file format (image3)
Now we implement the particle in an example application
Create a default cocos2d application template
Import a Particle Designer plist file to project
Now on the HelloWorld Scene overwrite method init
Download and fork github lighter project
https://github.com/ferbass/lighter
I hope you enjoy the article
Particle Designer
cocos2d
![Screen shot 2011-05-03 at 01.59.06](/uploads/2011/05/Screen-shot-2011-05-03-at-01.59.06-300x260.png)
![Screen shot 2011-05-03 at 02.13.04](/uploads/2011/05/Screen-shot-2011-05-03-at-02.13.04-300x212.png)
![Screen shot 2011-05-03 at 02.14.26](/uploads/2011/05/Screen-shot-2011-05-03-at-02.14.26-300x242.png)
![Screen shot 2011-05-03 at 02.21.26](/uploads/2011/05/Screen-shot-2011-05-03-at-02.21.26-300x220.png)
-(id) init
{
if( (self=[super init] )) {
CCParticleSystemQuad *fire = [CCParticleSystemQuad particleWithFile:@"fire.plist"];
CGSize size = [[CCDirector sharedDirector] winSize];
fire.position = ccp( size.width /2 , size.height/2 );
[self addChild:fire];
}
return self;
}
and the final result
![Screen shot 2011-05-03 at 02.29.24](/uploads/2011/05/Screen-shot-2011-05-03-at-02.29.24.png)