Colludium's Recent Forum Activity

  • Corrected string entry in Actions: Bits-Category string and Bits-Mask string. Enter the 16 flags as a string of 1's and 0's - it's easier to visualise.

    Thank you, now I understand Bits

    Can you share me capx demo here http://box2dassimilatedemo01.bitballoon.com/ ? I want to understand "Assimilate joint"

    I created 2 capx to test here:

    test BOX2D+ capx here: https://drive.google.com/file/d/16A-TPX ... p=sharinag

    test PHYSICS capx here: https://drive.google.com/file/d/17JQcRP ... sp=sharing

    I tried to set higher value at Action "position Iteration(3000 or more)","velocity Iteration(8000 or more)" but the sprites move inaccurate. I test with Physics behavior of C2, Its move accurate, rigid. Is it a bug?

    Good re: collision filtering.

    Velcocity iterations default is 12 and Position iterations default is 8. Setting these numbers so high will possibly cause jank in complex collision situations as the engine resolves floating point values to no visible effect, I expect. It won't make any joints more solid, unfortunately.

    The weld joint in Box2D+ is good for attaching 2 or 3 objects together, not long chains of objects. The standard physics engine appears more stable using limited revolute joints. I will provide an example of assimilate joint use later today (I need to recreate the demo capx, so give me a little time).

  • gameba - I forgot to add - there is an Action that allows you to enter the Category and Mask Bits as strings.

    Update to v 1.02

    Corrected string entry in Actions: Bits-Category string and Bits-Mask string. Enter the 16 flags as a string of 1's and 0's - it's easier to visualise.

  • Updated to v 1.01

    Bug fixes:

    Minor changes to editor text

    Group Index now can be set to negative values (d'oh!).

    No breaking changes.

    Please re-download from the store to update.

  • I bought your behavior, your document write:

    " If both group index values are the same and negative, don't collide" but when I set group index negative (-2) ,Its always return positive (2) and collide. Is it a bug?

    Sorry,I read your document and play with "collision filter" for 5 hours but I can not understand how to combine together "Category bits", "Mask Bits" and "Group index" .Its really hard for me , so Do you have any example capx for "collision filter"? Thank you very much

    Yes, it's a bug (assuming you're referring the editor settings). Hang on for an update!!

    The Mask and Category Bits are complex, until you understand them. They are a decimal number that represents a set of binary bits - if a bit in the Category for Object_A is 1 and the same bit in the Mask for Object_B is 1 then they will collide. The Group Index is used to override these settings for special occasions where you want to alter the collision between two objects. It's a result of how the Box2D library is written - in code, you can use variables to assign Mask and Category bit values and the Group Index allows you to override that variable's value. This iforce2d tutorial might help - it goes into great detail of how it works. I'll try and put together a capx example that should help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Colludium Awesome, I bought it! Is there any way to make this framerate independent? I use chipmunk atm and the physic simulation goes crazy fast on my 144Hz monitor. Will I have the same problem with this?

    Awesome . This is already framerate independent (deliberately so because of that very issue). Let me know if you encounter any snags.

  • Wow looks great! Nice work!

    Would love to see a performance comparison between this and the regular JavaScript Box2D Construct 2+ uses already, as it would demonstrate why more of the JavaScript should be created from Emscripten/ASM.js

    Thanks! This version has similar performance to the asm.js physics, but in my tests it's more stable (see the stress test example that compares all of them). I totally agree, it would be amazing if the runtime was written to compile emscripten...!

  • For Sale!

  • This is a Box2D behavior based on the Emscripten port at r2.3.0 standard. The plugin gives access to most of Box2D and includes some added helper features to make the dev process easier. The demo can be found here: link

    There main demo has 4 parts:

    1. The start screen gives you an idea of performance and demonstrates one-event conveyor belts with kinematic bodies. Collision points and polygons can be selected to be drawn and objects can be thrown around.

    2. Bitmap / scan image. This is a demo with 2 objects - one fixed and one that will be re-spawned; when running, both types can be dragged. You can use the default images or upload your own into the demo. When you press Start the engine will scan the images and assign collision polygons from the image alpha.

    3. Stress test. A comparison with Chipmunk (which, from my previous testing, is the best non-emscripten physics library in JavaScript) and the standard asm.js physics behavior. The test creates a pyramid of boxes that you can interact with or just watch collapse....

    4. Draw objects. Draw some physics shapes, convex or concave, and watch them fall down. The shape vertices are stored in a c2 array which is loaded into the Box2D+ plugin to form the collision polygon.

    Summary of features:

    Scan image to create polygon from its alpha (uses adjusted versions of hull.js and simplify.js)

    Circle, polygon and box shapes

    Speed clamp

    Rotational speed clamp

    Collision point

    Dynamic, Static and Kinematic bodies

    Collision filtering (category and mask bits)

    Object gravity scale

    World x and y gravity values

    Load collision hull from c2 json array

    Get collision hull as c2 json array (create polygons outside your game and upload from string)

    Raycast world queries

    Assimilate Joint - demo: link

    All joints are demo'd here: link

    AABB world queries (find objects in a defined box area)

    Gravity attractor

    Polygon editor capx (demo: link)

    Instructions!

    More joint helper expressions added

    Obtain collision impulse and collision impulse angle

    Obtain pre-collision and post-collision velocity (x and y values)

    Collision Pre-Solve trigger and an action to disable the collision

    Compatible with Minify export

    Helper plugin, if you want 1 pixel sized vertices (instead of 3 pixels in standard Box2D+) then add this helper plugin to your project: plugin link. Box2d+ will find the plugin and change the world scale.

  • Last testing being carried out now and a couple of extra features have been added (see first post).. The plugin contains plenty of hooks for the helper behaviors (although you'll only see them if you open the runtime.js). Providing there are no last-minute bugs, I hope to have the Box2D+ behavior released as beta very soon!!

  • Personally I'm very interested in the platform functionality, so hopefully you'll have time/interest to continue to work on that even if you decide to release rest of the behavior early Either way, thanks and I'm keeping my eye on this!

    Thanks. And absolutely. My real job is killing my spare time, so progress is slow, but I will complete the platform behaviour element, even if it kills me. It'll be good to get the main plugin out to confirm no bugs.

  • Great job Colludium can't wait to play around with the plugin.

    Speaking of playing around with the plugin, why don't you release the physics plugin already without the platform helper plugin?

    I personally don't need the platformer part and would love to already use the physics plugin and possibly find bugs/problems you might have missed, if you dont want to do that, that's obviously fine too.

    Also, it is awesome that you actually took the time to write a manual for your plugin as well.

    That way people don't have to look for inforamtion by scrolling through a ton of forum pages

    Thanks! And you make a very good point - I wanted it all to work together but, to be honest, the physics behavior is the only one of importance, the others are nice-to-have free additions. I will do just that - expect the plugin to be released in the next few days!!

  • Colludium

    great work so far!

    Is it possible to simulate water surface?

    Thanks! Good idea. Having thought about It, it might very well be possible to add a buoyancy feature. This would involve defining a buoyancy line (the water surface position and water density via events) then have an algorithm to sequence through each fixture and determine the push force and position. I think I could make that work - iforce2d has a tutorial, iirc.

    As soon as the platform helper is complete then I'll release the behaviour and work on this additional feature, perhaps as another helper plugin.

Colludium's avatar

Colludium

Member since 26 Aug, 2013

Twitter
Colludium has 11 followers

Connect with Colludium

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies