Chipmunk particle system?

Official forum for the Chipmunk2D Physics Library.
Post Reply
alf
Posts: 7
Joined: Thu Sep 11, 2014 3:16 am
Contact:

Chipmunk particle system?

Post 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?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Chipmunk particle system?

Post 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.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests