verlet max reaches new speeds.. 8,500 at 60 fps

Community Forums/Showcase/verlet max reaches new speeds.. 8,500 at 60 fps

Nate the Great(Posted 2009) [#1]
Ok so I had never thought to test how my physics engine would preform when faced with the challenge of simulating 8500 objects in a game like situation. This test shows a simulation in which the many objects are not all touching but they are touching here and there and bouncing off of eachother as well as you might have in a game with a gigantic map. Many thanks to Oddball for giving me the idea to test my engine in this way.

http://naillproductions.synthasite.com/resources/verlet%20max%20stress%20test.zip

a title image with a bullet going through it here http://www.youtube.com/watch?v=WgWCU1Uiol4

I have a 2.6 ghz dual core (but its still not multithreaded so whether you have 1 or 2 or 4 cores should not make much difference.

by the way, its 100% blitz max! no external c libs


ImaginaryHuman(Posted 2009) [#2]
Cool man, I got around 8000 also on a 2.4GHz Intel Quad Core.

How are you achieving a comparison of every object potentially colliding with every other object? Do you use an acceleration structure to avoid having to compare everything to everything? Like a grid or something?


Nate the Great(Posted 2009) [#3]
How are you achieving a comparison of every object potentially colliding with every other object? Do you use an acceleration structure to avoid having to compare everything to everything? Like a grid or something?


thanks
I use a grid and arrays to store the points for much faster access.

But one thing I forgot to take out before I built it and uploaded it is an extra cosine and sine and atan2 function call for ever collision... I dont even use the values those return anymore...


_Skully(Posted 2009) [#4]
While your fixing that.. can you have the text print in front of the vertlets.. I can't see the data ;)


Nate the Great(Posted 2009) [#5]
While your fixing that.. can you have the text print in front of the vertlets.. I can't see the data ;)


lol oops... idk why I always do that... I looked at my many other experiments and it always happens!!!


Nate the Great(Posted 2009) [#6]
ok fixed all the little bugs lol


_Skully(Posted 2009) [#7]
I get a total use (render + update) of 16ms = 60fps at 829 vertlets on my laptop


Nate the Great(Posted 2009) [#8]
829 as the top number? not possible lol it must be a multiple of 4
the top number is the number of verlets the second number is the number of boxes, each of which contains 4 verlets

thats 3316 verlets


_Skully(Posted 2009) [#9]
Oh.. I cant see the top number then because the window opens above the top of my screen (and stretches below the bottom).... I thought that was the number of vertlets :) 3316 is much better!


Nate the Great(Posted 2009) [#10]
whoops... I may have overdone the dimensions on that window... it loods fine on my screen


slenkar(Posted 2009) [#11]
I got 4000 verlets at about 30FPS pretty good!

the total update time was 35
so 1000/35 is about 30


Nate the Great(Posted 2009) [#12]
I got 4000 verlets at about 30FPS pretty good


could you post your specs please... I am now confused because I can get 13,000 at 30 fps and I just have a 2.6 ghz dual core


joncom2000(Posted 2009) [#13]
Why not at an fps display to the test to make it easy to see what fps people are getting?


Nate the Great(Posted 2009) [#14]
oh I can add that too... lol I just use fraps but I guess an fps meter would help


GfK(Posted 2009) [#15]
I just held the spacebar down until it hit 30ms + 4ms render time (30fps). That was around 10000 verlets.

Athlon64 X2 5000+


Nate the Great(Posted 2009) [#16]
thanks for testing gfk

just curious. when did it slow down from 60 fps?


MGE(Posted 2009) [#17]
4804
1201

fps 30

What does that tell me? I'm confoosed...


Nate the Great(Posted 2009) [#18]
4804 means 4804 verlets in the simulation

1201 means 1201 boxes in the simulation (each containing 4 verlets)


Duckstab[o](Posted 2009) [#19]
i got 13056/3264 average of 26 update render 3

fps 32-37


Duckstab[o](Posted 2009) [#20]
dropped below 60fps just after 8100-8200


_Skully(Posted 2009) [#21]
Oi!..must be nice ;)


slenkar(Posted 2009) [#22]
I got 4000 verlets with an old 2.5ghz CELERON so it is probably twice as slow as one of your cores


Nate the Great(Posted 2009) [#23]
I got 4000 verlets with an old 2.5ghz CELERON so it is probably twice as slow as one of your cores



I have dual core 2.6 ghz but its a pentium 4 not a celeron... is there a big difference?

edit: just read up on this

http://computer.howstuffworks.com/question268.htm
­When you sort all this out and compare the two chips side by side, it turns out that a Celeron and a Pentium 4 chip running at the same speed are different beasts. The smaller L2 cache size and slower bus speeds can mean serious performance differences depending on what you want to do with your computer.



BlitzSupport(Posted 2009) [#24]
Nice!

6000 @ 60 FPS
10000 @ 30 FPS

(I think my specs are in my sig... )

It might be worth bearing in mind that crappy laptop graphics chipsets might struggle with rendering 5000-10000 individual objects, so it may not just come down to CPU. (Perhaps a no-draw toggle would be useful?)


Nate the Great(Posted 2009) [#25]
It might be worth bearing in mind that crappy laptop graphics chipsets might struggle with rendering 5000-10000 individual objects, so it may not just come down to CPU. (Perhaps a no-draw toggle would be useful?)



but then you wouldnt get to see that its actually doing anything lol..

and in a game you would never have to draw that much on the screen at one time... with the exception of my game flood ;)


Jason W.(Posted 2009) [#26]
6500 @ 60 FPS
12300 @ 30 FPS

i7 920 @ 2.67GHz
6GB DDR3
Windows 7 RC 64bit


Jason


beanage(Posted 2009) [#27]
7000 part.s | 50 - 60 FPS | total ~19 ms


sswift(Posted 2009) [#28]
5000 at around 60fps.

Athalon 64 X2 4600+


Taron(Posted 2009) [#29]
~9200 (60fps)
MacPro (Xeon 3ghz/8core) Nvidia 7300GT

Man, I wanted to write a nice sorting tree, too... reminds me! But the last thing I was writing was/is a racer with the player in center, which doesn't need it, haha... just testing against box around 0! (lol)


Jur(Posted 2009) [#30]
4500 ~60fps
Geforce 7300GS
athlon X2 2GHz


Nate the Great(Posted 2009) [#31]
~9200 (60fps)
MacPro (Xeon 3ghz/8core) Nvidia 7300GT



you ran it from the source code?

and to everyone, thanks for trying it out, now I know about how many particles I can have in my next beta version of flood without dissapointing people with slowdowns.. :)


_Skully(Posted 2009) [#32]
Hi Nate the Great...

I've looked over the vertlet code and with a very small modification I should be able to integrate it with TileMax... the tiles will double as the grid and the way movement is done in tilemax the vertlets will always be sorted into grids (TileMax attaches everything to the tiles)... will be interesting to see the effect of the tile collision code on the overall performance.

I wont be using it for anything near as intense as what you have going on so it should work out for me at least...


Nate the Great(Posted 2009) [#33]
Hi Nate the Great...

I've looked over the vertlet code and with a very small modification I should be able to integrate it with TileMax... the tiles will double as the grid and the way movement is done in tilemax the vertlets will always be sorted into grids (TileMax attaches everything to the tiles)... will be interesting to see the effect of the tile collision code on the overall performance.

I wont be using it for anything near as intense as what you have going on so it should work out for me at least...



feel free to use it for whatever you want... Credit to verlet max would be nice (in any way shape or form) if you make something out of it but is not a requirement.. I will include a license with future releases.


_Skully(Posted 2009) [#34]
OMG I finally got a verlet to show up under my foreground layer LOL

Integrating this was easier than I thought it was going to be... so far lol

I'm actually making this part of actor control as well since it comes with a bunch of cool physics stuff :)


Nate the Great(Posted 2009) [#35]
cool skully. I just added a physics body type so maybe that would help you. Its not up for release yet but I can email it to you if you want. Just shoot me an email and ill be happy to attach it.

edit: new video up

http://www.youtube.com/watch?v=WgWCU1Uiol4


_Skully(Posted 2009) [#36]
Emailz.. away ;)