Chipmunk particle system?

Official forum for the Chipmunk2D Physics Library.

Chipmunk particle system?

Postby alf » Thu Sep 11, 2014 5:20 pm

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?
alf
 
Posts: 7
Joined: Thu Sep 11, 2014 3:16 am

Re: Chipmunk particle system?

Postby slembcke » Wed Sep 17, 2014 12:58 pm

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/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm


Return to Chipmunk2D Physics

Who is online

Users browsing this forum: No registered users and 2 guests

cron