New Physics Stress Test

Post your own tutorials, guides and demos.

Post » Tue Jul 29, 2008 6:46 pm



This should be a fairly decent demonstration of the processing power of the new Box2d physics now replacing the Newton physics. In Newton I get 40fps, in Box2d I get 400 fps.

We've tried to make the cross over from Newton to Box2d unrecognisable..It's simply a case of open your old cap that has physics in it and oh cool its 10 times faster! Forces and everything get scaled so your games shoudn't behave too much differently from before...though keep in mind it is a different physics engine...anyway we'll see how it goes

Once any 'cross over' bugs have been fixed we'll impliment more of Box2d's features...and before long we'll have ragdolls being hung from springs which break if under too much tension etc etc etc.
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Tue Jul 29, 2008 6:50 pm

Umm i got 700 at start then 200 when everything stoped.
And about "Custom Collision" i though Box2D didnt have that :/
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Tue Jul 29, 2008 7:04 pm

Box2d has come a long way since it just supported boxes. Originally we were going to use chipmunk but then we discovered it doesn't handle elasticity all that well (elastic stacks dont rest).... Box2d seems to support everything chipmunk does as well as supporting sleeping bodies and seems to handle everything okay...plus it has support for sweep collisions, more joint types... and stuff! ... it just seems fancier.

Anyway it supports convex polygons and compound shapes (where u make a physics body out of multiple shapes)...so yeah it will support custom collision eventually :)

Interesting that the fps dont jump back up when all the objects are resting... maybe sleeping hasn't been activated... hmm!
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Tue Jul 29, 2008 7:15 pm

I even tried if the moving objects are the reason for this, thats why i changed .cap a little to wrap these objects, and after a while it was ~200fps.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Tue Jul 29, 2008 7:20 pm

Wow! That runs smoothly even on my p3 600 mhz machine! Nice! :D

178 start, 45 settling here, then when everything stops it goes up to 70.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Tue Jul 29, 2008 10:18 pm

[quote="David":igjabaa3]
Anyway it supports convex polygons and compound shapes (where u make a physics body out of multiple shapes)...so yeah it will support custom collision eventually :)
[/quote:igjabaa3]


Hell yeah, I'll be able to make a pinball game after all!
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Jul 31, 2008 5:35 pm

Groovy, starts at 555fps, then drops to 478fps while resting.
B
2
S
2
G
5
Posts: 156
Reputation: 1,962

Post » Thu Jul 31, 2008 6:45 pm

piii
932MHz
256MB ram

i get around:

180~200fps at the start
60~70fps while it's settling
80-100fps after it's finished settling
30~50fps after vigorously moving the window around*

*after moving the window around, it is possible to cause all movable objects to either further fill in the open spaces or bounce upwards before ultimately falling back down
B
2
S
2
G
5
Posts: 293
Reputation: 2,236

Post » Thu Jul 31, 2008 11:33 pm

Physics doesn't seem to like low framerates. [url:3izz914i]http://www.scirra.com/phpBB3/viewtopic.php?f=16&t=1373&start=0&st=0&sk=t&sd=a[/url:3izz914i]
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Sat Aug 02, 2008 7:33 am

That is incredibly amazing, doesn't even require any events :o
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Next

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests