Hi.
The last version of cocos2d introduced the concept of points (as opposed to pixels). This resulted in an inconsistency when developing a game for both iPad and iPhone, particles are to big and to fast on the iPhone if I design the particles for the iPad.
Because of this I wrote a small utility method, and would love some feedback on this issue, or tips for a better approach:
+ (void) adjustParticlesForDevice:(CCParticleSystemQuad*)p {
CGFloat scale = IsIPad ? 1.0 : .5;
p.startSize = p.startSize * scale;
p.startSizeVar = p.startSizeVar * scale;
p.endSize = p.endSize * scale;
p.endSizeVar = p.endSizeVar * scale;
p.speed = p.speed * scale;
p.speedVar = p.speedVar * scale;
p.gravity = ccp(p.gravity.x * scale, p.gravity.y * scale);
}
UPDATE:
After a bit more testing I noticed I need to update the life span as well, I find this very strange...
p.life = p.life * scale;
p.lifeVar = p.lifeVar * scale;