Page 1 of 1

Chipmunk particle system?

Posted: Thu Sep 11, 2014 5:20 pm
by alf
Hello.

Has anyone written a particle system on top of Chipmunk? And if not, how much effort would that entail (given that I'm starting from ground zero in terms of my physics expertise)?

Mulling it over a bit lead me to think in order to do this, one would need to set up separate cpSpace objects for each one, based on which direction the sparks (or whatever) were supposed to shoot out. But I don't know that it'd be good practice to have so many spaces going at the same time.

Thoughts?

Re: Chipmunk particle system?

Posted: Wed Sep 17, 2014 12:58 pm
by slembcke
Sure, people have done it before. It really just comes down to giving each particle a physics body, or performing raycasts for their movement. It doesn't really hurt anything to have multiple spaces running at the same time.

Keep in mind that Chipmunk is a rigid body physics library though. It's not optimized for simple particle physics. It doesn't provide a fast path for objects that don't rotate, and objects can be any size or shape. This is all extra work that a simple particle physics engine could skip.