[r60] PhysicObjects go mad after exporting

Bugs will be moved here once resolved.

Post » Fri Sep 30, 2011 9:04 am

In this html, a ball will drop on a pile of squares.

The ball's Density: 1
The Square's Density: 100

http://dl.dropbox.com/u/31590694/PhysicsTest/index.html

We can see the pile collapses in about 10 seconds.
if the squares' density are lower, it collapses sooner like all the squares become mad.

However, you can open the capx below, run it's layout;
it won't ever collapse in capx.
http://dl.dropbox.com/u/31590694/PhysicsTest/PhysicBuildingTest.capx

So if you made something like the buildings in "Angry Bird",
you'd think you did a great job in capx's layout running,
and found all the buildings collapsed in exported html because of a tiny touch.
gonzdevour2011-09-30 09:06:43
B
106
S
27
G
8
Posts: 209
Reputation: 12,525

Post » Fri Sep 30, 2011 1:33 pm

Have you read the Physics basics tutorial?

[quote]Things like incredibly heavy objects piled on a stack of really light boxes, huge piles of objects, or very fast moving heavy objects tend to cause instability. Try to keep everything in your game at reasonable proportions.[/quote]

I would expect a density ratio of 100:1 is too much for the physics simulation to handle. You should keep things far more reasonable otherwise you can't expect realistic results - I'd say 10:1 is more reasonable for densities.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Fri Sep 30, 2011 2:00 pm

100:1 is just an extreme value for test.
Actually, they collapse in reasonable proportion like 5:1

I've remade the examples, try the 2 links again.
Thanks for reply.gonzdevour2011-09-30 14:02:33
B
106
S
27
G
8
Posts: 209
Reputation: 12,525

Post » Fri Sep 30, 2011 3:52 pm

Ah, I guess gonzdevour means that the performance in preview (it won't ever collapse in capx) is different to export (it collapses sooner) at physic behavior.
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Fri Sep 30, 2011 4:16 pm

[QUOTE=rexrainbow] Ah, I guess gonzdevour means that the performance in preview (it won't ever collapse in capx) is different to export (it collapses sooner) at physic behavior.[/QUOTE]

Yes, that's it. Thanks.

The pile of physic objects stay stable in capx,
but go mad in html. That what I mean.gonzdevour2011-09-30 16:22:20
B
106
S
27
G
8
Posts: 209
Reputation: 12,525

Post » Fri Sep 30, 2011 4:25 pm

Well, that's odd! If you don't minify the script, it works OK. If you minify it, it changes the behavior. It must be something the minifier is doing. I'll look in to it.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Mon Nov 21, 2011 10:05 am

r68 - the problem is still here. I just want to minify my script. Is there a hope?
B
109
S
6
G
6
Posts: 14
Reputation: 7,327

Post » Sat Dec 03, 2011 7:12 pm

r70 just discoverd this bug also, only on minified versions, hope it can be fixed

edit:

if you put all step accuracy to zero it has somewhat of thesame behavior, jelly like, but with minifier it also adds somewhat of a motion

a temp solution could also be to disable minifier on the parts of physic engine but not on the rest of the game? if that is possible.vtrix2011-12-04 23:49:51
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests