ASM.js physics possible bug

0 favourites
  • 4 posts
From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • 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.

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

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)