Polygon explosion

Discuss new features and future development.

Polygon explosion

Postby memmaker650 » Sat Jul 13, 2013 7:06 am

I'm newbie with Chipmunk physics and want to make an easy example of polygon explosion.

I started with the SmashLogo demo but in this example the are no explosions, only so much ball movements.
I know how to do polygon collision but my dude is for example how to explode a cube into many little pieces.
memmaker650
 
Posts: 3
Joined: Sat Jul 13, 2013 6:36 am

Re: Polygon explosion

Postby slembcke » Sat Jul 13, 2013 12:24 pm

So I have a demo of that in the vanilla C code too actually:
https://github.com/slembcke/Chipmunk2D/ ... /Shatter.c

It splits a polygon into voronoi regions similarly to how you'd implement grid based Worley noise. It's not commented well unfortunately. I could try and give you some pointers if you wanted to use it though. Try it out in the demos and see if that's what you think you want.
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

Re: Polygon explosion

Postby memmaker650 » Tue Jul 16, 2013 4:59 am

slembcke wrote:So I have a demo of that in the vanilla C code too actually:
https://github.com/slembcke/Chipmunk2D/ ... /Shatter.c

It splits a polygon into voronoi regions similarly to how you'd implement grid based Worley noise. It's not commented well unfortunately. I could try and give you some pointers if you wanted to use it though. Try it out in the demos and see if that's what you think you want.

Thanks, i will try your code and post here the part of the code which define the 'explosion'.
memmaker650
 
Posts: 3
Joined: Sat Jul 13, 2013 6:36 am

Re: Polygon explosion

Postby memmaker650 » Tue Jul 16, 2013 6:37 am

Really nice example.

I will customize the tank demo using the SmashLogo demo for the bullet and the Shatter Demo to apply the explosion/destruction to create a custom demo to show a fire&destroy chipmunk example.

But i'm surprised, the Shatter demo is new. I worked with Chipmunk 6.1.4 and I don't have any Shatter.c file. Nice to see new demos. Good work.

Thanks slembcke.
memmaker650
 
Posts: 3
Joined: Sat Jul 13, 2013 6:36 am


Return to Features/Development

Who is online

Users browsing this forum: No registered users and 0 guests

cron