ASM.js physics possible bug

Discussion and feedback on Construct 2

Post » Sun Aug 09, 2015 12:37 pm

Hello,

First I'm sorry to post this in the general discussion, but I've already posted three times a similar topic in the bugs section that was moved in the closed bugs. The problem is related to creating objects with physic behavior on the fly. As seen in this topic https://www.scirra.com/forum/physics-error-and-crash_t150137, other people encounter the same bug, and it seems to be not linked to how many objects you create even though the bug occurs more often with many objects created.

After testing, and reading others comments and experiences, I'm pretty sure it's not the "way" asm.js is programmed, but a memory leak.

So I posted here because Ashley closed the topic each time with no more explanation and we can't discuss any more about and maybe find a solution.

If someone is interested, we can go further together. It's a big issue for me as I'm working on a commercial project and at the moment I'm stuck on this (it crashes the program).

Thank you all for your time.
B
14
S
4
Posts: 109
Reputation: 1,281

Post » Sun Aug 09, 2015 2:37 pm

I expect that the problem you highlight will only ever get resolved if it is addressed by the emscripten developers - which I find unlikely unless we all start telling them of bugs in their code. I understand that they have an algorithm that to convert c to javascript but it clearly causes subtle errors in function. Although it's a great concept, without the backing of a major developer behind it, I have little confidence that this problem will get rectified (because they are an unpaid 3rd party to scirra). There are also joint problems associated with asm.js that have been documented for many months now. I personally consider asm.js to still be in beta and my advice would be to use it accordingly - I think we'll have to wait for the next (annual?) release of asm.js box2d to see if that will fix these problems while not introducing any more.

I personally think scirra would be better off focusing on fully implementing one proven and versatile physics engine as a full-up plugin (ie full box2d?) as I think that would be a better selling point than indefinitely waiting to see if emscripten will one day become reliable.
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,207
Reputation: 43,836

Post » Mon Aug 10, 2015 2:59 pm

@Nabu0001

I downloaded your capx file from the thread above and it crashed for me after a couple hundred coins were created...

then I removed the regular physics behaviors and changed them to Chipmunk physics. I am up to over 2500 coins, and it has been running for around half an hour with no trouble. (I also added a text box that displays how many coins there are).

I first tried Chipmunk physics last week when I needed to know how much force was being applied to an object and the regular physics did not seem to have a way to do that. But I was amazed at how much faster my game ran on my iphone with Chipmunk physics. With the asm.js physics it would stutter and was barely playable, but with Chipmunk physics it ran smoothly (as well as giving me the extra info I needed). So, I would give that a try!
B
95
S
33
G
20
Posts: 438
Reputation: 17,640

Post » Mon Aug 10, 2015 4:23 pm

In my game, when i select asm.js as a physics engine, the game crashes randomly after random amount of time, i don't know if it's a same issue as discussed here, and i can't reproduce it because it's so random. I can only say that i don't have crashes with box2dweb.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests