Physics issue - objects move when exported

Discussion and feedback on Construct 2

Post » Wed Dec 14, 2011 11:17 am

I have a problem where my physicalized objects move, as if there is a constant force, after I have exported my project.

When I run the project in the preview version (the "Run layout" button), the boxes doesnt move at all, and everything is very stable. As it should be.

But when I export the same project, they start to constantly move until they fall. I have tried with different physics settings, but the result is always the same.

Is there a different between the preview-version and the exported version?
Because it seems this issue only appears when the project has been exported.

I have the same issue regardless if I run the exported html file locally or from a server.

I made a new test project to test this issue, and I got the exact same results. Here is a project file example:
http://dl.dropbox.com/u/52716812/PhysicIssue.capxCodeMasterMike2011-12-14 11:18:53
B
38
S
13
G
9
Posts: 151
Reputation: 8,437

Post » Wed Dec 14, 2011 11:28 am

@Ashley should have a look at this.
We'll leave it here for now, but it sounds like some bug in the physic object indeed.
Same result under chrome and FF, the blocks move on their own.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Wed Dec 14, 2011 11:41 am

Alright, hopefully can they find a sollution for it. If it is a bug, can it be moved to the Bug section of the forum?

I get the same result in Opera as well.

[EDIT]
It seems it has something to do with the Minify option when exporting.
If I uncheck the "Minify" option, the exported version works like the Layout version.

I have downloaded and re-installed the latest Java from Java homepage, but still the same issue when I export with the Minify option checked.CodeMasterMike2011-12-14 12:56:58
B
38
S
13
G
9
Posts: 151
Reputation: 8,437

Post » Wed Dec 14, 2011 3:55 pm

Sounds like this bug - the minifier breaks physics.

I made a post to Google about it, their Closure Compiler is used for minification and seems to break Box2D. It might take a while to fix, but I'm slowly working on it. In the mean time disabling the minifier is the workaround.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Dec 15, 2011 7:33 am

Yes, sounds like the exact issue, thanks Ashley!
B
38
S
13
G
9
Posts: 151
Reputation: 8,437

Post » Thu Dec 15, 2011 12:14 pm

Yeh i have the same problem in my santa catapult game, the blocks would be stacked fine in preview but fell over when run online. After alot of fiddling and messing with placements and alot of uploading again i got it working, but there is still some movement sometimes. One way that fixed it quick was to use Bounding Box, but it didn't interact with my game as i wanted it too when i changed it to that.tonycrew2011-12-15 12:15:32
B
40
S
14
G
11
Posts: 243
Reputation: 9,432


Return to Construct 2 General

Who is online

Users browsing this forum: blackhornet and 4 guests