[Behavior] Box2D+ (asm.js r2.3.0; v2.0)

  • Very nice Plugin!

    The Option to apply Force at a particular Point is brilliant!

    Edit:

    Also the many attributes (particularly Object.Box2DPLUS.Velocity is useful, as opposed to only VelX and VelY)

    Edit2:

    OMG also no Collision Option when setting a Joint!!!!

  • Leralasss - I am glad you like it!!

  • matriax, here are capx's to compare the tower building performance of Box2D+, Physics and Chipmunk.

    On my laptop I found they could all build tower heights of 30 rows without any problems in behavior or performance. Higher than that and cpu increased to max / the fps reduced and each plugin then misbehaved in different ways. Chipmunk towers would fall down to the right whereas Box2D+ and Physics towers would slowly deform before falling down. To be honest, I think that Physics had ever-so slightly the best performance, then Box2D+, then Chipmunk.

  • Colludium

    is it possible that you add debug properties to the Debug mode in C3?

    right now there is "MyProperty" in there. (would be cool to see all the stuff the normal physics plugin shows, most importantly probably if it is enabled )

  • Leralasss - I will take a look into facilitating the debugger for the near future. Good idea - I will keep you updated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Colludium Thanks for the pyramid demo!

  • Colludium

    Pls, view capx https://drive.google.com/file/d/1LZ4PB_ ... sp=sharing

    Why does the sprite4 in events 1,2,3 not get impulse?

  • Hi The impulse data is only available after the collision and response have been calculated by the Box2D+ library, and that information is only available at On End-Contact. The Box2D+ World steps many times each tick. The On Begin-Contact indicates when a World step first notes that a collision must be resolved. Each Pre-Solve and Post-Solve then mark the beginning and end of each collision calculation step. Many such calculations will take place for each two colliding objects. Thus, a collision's triggers might look something like:

    • On Begin-Contact
    • On Pre-Solve
    • On Post-Solve
    • On Pre-Solve
    • On Post-Solve
    • On Pre-Solve
    • On Post-Solve
    • On End-Contact

    The impulse (momentum change) inside a collision can only be resolved once the final collision velocity is available, and that is at the End-Contact. Hope this explains it?

  • Please, Help Colludium

    when I press restart button after destroying the link sprite, I received a bug (view video here https://youtu.be/fto53dyGiH4)

    CAPX HERE: https://drive.google.com/file/d/0B8g2b8 ... sp=sharing

    HAPPY NEW YEAR!

  • Hi gameba - Happy New Year to you too!

    I took a look at your capx - weird problem caused by the layout restart. I suspect that it was a combination of the Box2D+ library not coping with the destruction and recreation of a large number of recycled objects all at once. You see, when you set an object to Box2D+ Enabled then the body is destroyed and then recreated, including all joint references. The bug was caused after the layout had restarted.

    Here's a capx that contains the fix. The link object default is set Box2D+ Disabled, then - in the joint creation loop - there is a check that the links are disabled before they are set enabled. Before, the links were set enabled twice, once by reference through the family and then in the next loop iteration by reference directly by the link object condition.

  • Hi gameba - Happy New Year to you too!

    I took a look at your capx - weird problem caused by the layout restart. I suspect that it was a combination of the Box2D+ library not coping with the destruction and recreation of a large number of recycled objects all at once. You see, when you set an object to Box2D+ Enabled then the body is destroyed and then recreated, including all joint references. The bug was caused after the layout had restarted.

    Here's a capx that contains the fix. The link object default is set Box2D+ Disabled, then - in the joint creation loop - there is a check that the links are disabled before they are set enabled. Before, the links were set enabled twice, once by reference through the family and then in the next loop iteration by reference directly by the link object condition.

    OK, thank you for your support !

  • Colludium

    I found a bug in action "Velocity clamp", Its not work, nothing happens after you enable velocity clamp.

    p/s:

    I think you forgot add uid parameter at line 1683 in runtime.js file.

    I added uid param and it is working now

    this.setVelocity(new_vx, new_vy)   ----> this.setVelocity(this.inst.uid, new_vx, new_vy)[/code:2a10gmb3]
  • Thanks gameba - good find!

    Update published - bug fix - now v 1.16.

  • Colludium

    Event "end contact with" doesn't work, pls view capx.

    https://drive.google.com/file/d/11Yz_8Z ... sp=sharing

  • gameba - thanks for the bug report! I'll take a look and get back to you as soon as I can.

    Edit - I have a fix, I should have it all ready later today.

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