Colludium's Forum Posts

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

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

  • Sprite.ImageWidth

    Sprite.ImageHeight

    These are the texture size and are not the same as:

    Sprite.Width

    Sprite.Height

  • Thanks Ashley, will do.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Mmmm. It's broken for me again. There's nothing like an intermittent bug to fix.

    Version 64.0.3256.0 (Official Build) canary (64-bit)

    Construct 2 r248 64 bit built at 14:15:45 Oct 31 2017.

    zenox98 - can you un-close this please?

  • It works for me too with the newer update. The update should have been renumbered to avoid such confusion.

  • Does the same for me in Chrome Canary...!

  • the Mnk,

    Looks like it's not been fixed for this update. Here's how to fix the problem:

    Open the Sine Behavior runtime.js and make the following changes:

    Comment out line 131:

    //this.mag = cr.to_radians(this.mag);[/code:22on3kg9]
    
    Then insert this text at line 71:
    
    [code:22on3kg9]if (this.movement === 5){
    			this.mag = cr.to_radians(this.mag);
    		}[/code:22on3kg9]
    
    If you make these changes then beware that you're modifying an official plugin (so downloading an update will wipe away these fixes until scirra fix the problem themselves).