# [r60] PhysicObjects go mad after exporting

0 favourites
• 8 posts
• 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.

• ## Try Construct 3

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• Have you read the Physics basics tutorial?

hings 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.

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.

• 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.

• 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.

• 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.

Yes, that's it. Thanks.

The pile of physic objects stay stable in capx,

but go mad in html. That what I mean.

• 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.

• r68 - the problem is still here. I just want to minify my script. Is there a hope? <img src="smileys/smiley1.gif" border="0" align="middle" />

• 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.

• 8 posts