20,000 particles + bullet in real time

Official forum for the Chipmunk2D Physics Library.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

20,000 particles + bullet in real time

Post by slembcke »

Thought some might find this amusing. I made the following movie this weekend when working on other Chipmunk stuff. Just under 20,000 particles forming the shape of the Chipmunk logo.

http://files.slembcke.net/temp/logo_bullet.swf

For those that are wondering, it really is a real-time screen capture on my Macbook Pro. Go-go spatial hashing! :D
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
maximile
Posts: 157
Joined: Mon Aug 20, 2007 12:53 pm
Location: London, UK
Contact:

Re: 20,000 particles + bullet in real time

Post by maximile »

That's pretty amazing! When I try 20,000 circles (on a MBP) it takes 3.5s per frame, but that's without playing with any of the hash settings. Also I imagine having everything the same size helps a lot. Did you make any other clever optimisations?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: 20,000 particles + bullet in real time

Post by slembcke »

No, not other than setting the hash size to match the particle size. If left on the defaults, it did indeed run very very slowly. Several seconds per frame I would say.

Someday I'll get around to hierarchical spatial hashes I swear. :-|
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
ker
Posts: 56
Joined: Tue Jul 15, 2008 4:13 am
Contact:

Re: 20,000 particles + bullet in real time

Post by ker »

Wow, that is cool!

You don't happen to object to me copying that as a logo in the loader for my game instead of the chipmunk png-logo. (By copy I mean actually use chipmunk, I want to be free of resolution bounds ;) )
I think something like that is the perfect logo for a physics engine :)
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: 20,000 particles + bullet in real time

Post by slembcke »

Sure, I don't see why not. You might need to slim it down a bit though. I was barely able to get 15fps on a fairly newish penyryn Core 2 Duo. I'll probably add it to the official list of demos soonish.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
ker
Posts: 56
Joined: Tue Jul 15, 2008 4:13 am
Contact:

Re: 20,000 particles + bullet in real time

Post by ker »

Well... I can make it resolution dependent... ppl with low pc's won't use high res... mostly :)

hmm... I can't seem to find a good setting for the hash cell size, exactly the diameter of the circles(8.0) is not as good as 10.0, and higher numbers cause a loss of fps again. Higher numbers are better once the logo breaks up.

30 fps, huge hash cell number
http://www.youtube.com/v/BYupP_welAw
30-40 fps, 7000 hash cells for 6149 particles
http://www.youtube.com/v/3F5rEVGEkZU
Last edited by ker on Mon Oct 06, 2008 11:55 am, edited 2 times in total.
sickman
Posts: 19
Joined: Mon Oct 06, 2008 7:50 am
Contact:

Re: 20,000 particles + bullet in real time

Post by sickman »

Whoa! You surely got a very beefy computer!
MatthewHudghton
Posts: 9
Joined: Mon Oct 06, 2008 8:46 pm
Contact:

Re: 20,000 particles + bullet in real time

Post by MatthewHudghton »

wow thats cool
mwmerlo
Posts: 1
Joined: Thu Oct 16, 2008 3:25 pm
Contact:

Re: 20,000 particles + bullet in real time

Post by mwmerlo »

What program did you use for the screen capture? All the screen capture tools I use would have problems making that video.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: 20,000 particles + bullet in real time

Post by slembcke »

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 36 guests