r210 physics: asm.js joint flaw

0 favourites
  • 6 posts
From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • Problem Description

    Edited. I did some experimenting and it appears that asm.js is not very good!! When joints are created and played in box2d the joints behave properly. If the physics is changed to asm.js then the joints become a springy and somewhat unpredictable mess - they do not behave correctly.

    Attach a Capx

    capx

    Description of Capx

    One layout with 2 types of physics objects. One type is fixed (sprite) and the other is not (sprite2). When you run the layout, a family is used to pick the movable objects and join them together using limited revolute joints. The imagepoint(0) is top left and imagepoint(1) is top right of these objects; the objective is to joint the adjacent top corners of the objects using limited revolute joints. This semi-rigid jointed chain/platform is then attached to an immovable object via a revolute joint on the right so the whole assembly can pivot and rotate/fall anti-clockwise until the left segment strikes a ground object. The movement of that left object is of interest here.

    Steps to Reproduce Bug

    • Run the layout.
    • Observe.
    • Run the layout after selecting box2d web physics engine and observe.

    Observed Result

    In asm.js, when the 3 joined objects rotate down and strike the floor, the left-most object behaves incorrectly in 3 ways:

    1. It appears that the joint pivot is in the wrong place.

    2. It appears that the joint does not behave like a limited revolute joint because the object's angular range of movement exceeds the desired +/- 3 degrees declared in the event sheet.

    3. The motion appears springy - which is incorrect for this type of joint. This could be because the 3 degree limit is being exceeded, even though there is so little stress (ie this point and point 2 are symptoms of the joint being excessively flexible).

    NB The joint behaves correctly if box2d web physics engine is selected.

    Expected Result

    Joints that are created using asm.js physics engine should behave in a similar way to the box2d web joints..

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    W8.1 x64

    Construct 2 Version ID

    r210 64 bit

  • I reported something like this about a half-year ago, dunno why Ashley can't fix it.

    Link to report

  • Sisyphus - I remember!! Although asm.js promises some performance dividends, I think it's still very much in beta as these bugs indicate. I also suspect that any gains it offers now over the standard box2d engine might become unnecessary due to browser and hardware improvements. Time will tell!

  • Sisyphus - I remember!! Although asm.js promises some performance dividends, I think it's still very much in beta as these bugs indicate. I also suspect that any gains it offers now over the standard box2d engine might become unnecessary due to browser and hardware improvements. Time will tell!

    Yeah, also these tiny performance improvements is nothing if the physics engine is half-working.

  • Closing as duplicate of https://www.scirra.com/forum/r196-2-asm-js-revolute-joints-aren-t-strong-enough_t124164.

    I'm afraid I have no idea why this is. I didn't write either the box2dweb or asm.js versions of Physics, and the asm.js version is a non-human-readable build based from the original C++ sources, so I have no idea where any major differences could come from.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Understood - seems odd that only one joint didn't form properly...

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