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

1 favourites
From the Asset Store
2d mushroom sprite 2d game character enmy sprite game art
  • 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.

    OK thank you

  • v 1.20 now uploaded to the store for approval.

    Bugfix - some of the Collision with Object Type triggers were not firing.

  • Work in progress - warning of a minor breaking change in the next update!

    Hi,

    I am re-working the collision triggers for Box2D+ to fix a bug and to make it impossible to accidentally use the events in ways that are incompatible with the Box2D+ library. I have looked at what information is available, how reliably the plugin can create the information and what can be done with that information. From that, I am going to deprecate the following triggers:

    Begin Contact

    Begin Contact With

    Post Solve

    Post Solve With

    End Contact

    End Contact With

    And I am going to move the collision trigger to the standard c2 collision triggers

    On Collision

    On Collision With

    This means that all actions will be available after the collision trigger and the only other collision information that will be available, the Pre-Solve, can be used to cancel a collision as before. In the current plugin, it is impossible to, for example, set velocity to an object in an action after a collision trigger (the End-Contact trigger was 'adjusted' to enable this, but that has had a knock-on effect, because the End-Contact does not fire if the objects remain in contact at the end of the collision resolution).

    I will also add other conditions:

    Is In Contact

    Is In Contact With

    These will be true if the object is touching another object.

    Aside from making it impossible to accidentally use the triggers in ways that are not supported by the rest of the plugin, this will improve performance of the behavior a little (some of the collision listeners will be deleted - the removal of each will reduce the number of function calls per collision). I will leave the conditions in the editor so that games do not crash, but they will no longer have any effect and will be marked as *Deprecated*.

    I would be very grateful if you could let me know what you think of this - the changes might appear severe but I believe them to be necessary and I hope that they make sense / are acceptable...?

    Please let me know your thoughts - any big disagreements and good arguments will be considered, of course! Thanks.

  • Forthcoming update:

    v 2.00

    Deprecated conditions

    (still present in edittime.js but they no longer do anything - replace with On Collision)

    Begin Contact

    Begin Contact With Obj

    Post Solve

    Post Solve With Obj

    End Contact

    End Contact With Obj

    New Conditions

    On Collision

    On Collision With Obj

    (On collision essentially replaces the End Contact)

    Is in contact

    Is in contact with obj

    (Is in contact returns true when touching / remaining in collision with another object)

    Actions modified

    Revolute joint recreation now gives accurate location.

    Bug fixing

    Various minor bugs that were caused by layout restarts or changes when objects had been disabled or joints removed. Also fixed a bug where joints would not always be removed correctly on action.

  • Colludium, thanks for your great add-ons, I bought them all.

    I have a stupid question, not connected with the plugin.

    I liked the Shape editor, is there any way to use it to load collision polygon into sprites without Box2D+ ?

    Maybe create a new object for this ...

    (This would very much help to create complex polygons - obstacles in point&click, for example. There is no convenient editor for this in c2)

  • Colludium, thanks for your great add-ons, I bought them all.

    I have a stupid question, not connected with the plugin.

    I liked the Shape editor, is there any way to use it to load collision polygon into sprites without Box2D+ ?

    Maybe create a new object for this ...

    (This would very much help to create complex polygons - obstacles in point&click, for example. There is no convenient editor for this in c2)

    Hi. This is an excellent idea - I will work on one. It will have one caveat, though - that it will not support the standard Physics plugin (and Box2D+), if that's ok? I had nightmares getting it to be compatible with my version of box2d - I can't go through that again!!

    I'm thinking the following features, a bit like Box2D+:

    Load collision polygon from Array.AsJSON format.

    Save the collision polygon in Array.AsJSON format.

    Force the collision polygon to update to the one that's been loaded if the animation frame / animation changes.

    Anything else you can think of?

  • Thank you very much for this

    it was fast

  • repkino - Happy to help if I can! That picture - that's one lovely sprite (and huge collision polygon - watch out for performance hits with that many vertices!). Cheers.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Colludium

    I've just bought the Box2d+ plugin to use with C3. A couple of days ago when looking at the plugin, I've read that it was for C2/C3, but I cant seem to find that info anymore or to be able to open it in C3.

    Any help would be awesome

  • Ninjadoodle, I'll send you a PM. Bottom line is that I cannot support c3 because the new runtime will be hidden from sdk devs.

  • Hi Colludium

    I've just messaged you back - thank you for the super fast response - awesome customer support

  • Updated to v2.02

    Bugfix: changes to a tilemap were applied incorrectly.

  • some draft

    Beetle is made with Box2D+, steam with Emitter

    https://youtu.be/YGq1xvigjcE

  • some draft

    Beetle is made with Box2D+, steam with Emitter

    https://youtu.be/YGq1xvigjcE

    Wow!! I'm loving your work there!

  • https://playeremers.itch.io/gfchrgwstaz (password is batata)

    do you think i can build a full game like mine prototype here (climbing hill racing game) with no worries using only the default C2 physics for mobile (will build for pc was well)?

    because i saw your plugin just now, and it looks pretty good and maybe will be more efficient peformance-wise for mobile

    but im not sure if is worth to buy in my case/will it work on mobile (im always confused about the exporters for mobile and things like what to do so i can place ads on my mobile game.. i never built to mobile), specially when im in a situation where i need to spend money wisely

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