[BEHAVIOR] Chipmunk Physics

3 favourites
From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • Any future plans to port the Plugin over Construct 3? This would be freaking awesome! Because the standard box2d Plugin has some performance laggs

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Any future plans to port the Plugin over Construct 3? This would be freaking awesome! Because the standard box2d Plugin has some performance laggs

    If you read the thread 2 pages back - you will see the following post from R0J0hound that states he has no plans to convert to C3: https://www.scirra.com/forum/behavior-chipmunk-physics_p1136595?&sid=1aa581358862d0efd568915895ec0b14&sid=5ad861a2a0f2991e7b053c091fb3ed82#p1136595.

  • Can someone help me with collision layers? I cant get it to work. I know how it works with groups. But i need that two objects in one Layer would collide together, but both objects are attached on one object and they are all in one collision group

  • I know this has already been asked (With no response as far as I can see.) but how the hell do you use the collision layers? The tip it gives "If two objects with this bitwise anded together is non zero, they can collide." makes no sense to me. PLEASE HELP!!!

  • If you think of the layer property as binary you have 8 separate layers. The objects can be in all the layers or even a few of them. For example “11111111” would be all the layers, “00000001” would only be the first one, and “01010101” would be every other layer. Anyways any two objects will collide only if they share a layer. For example an object in layers “00001111” will collide with an object in layers “00000001” because they are both in the first layer. Whereas an object in layers “11110000” won’t collide with an object in layers “00001111” because they have no layers in common.

    You can also look at the chipmunk documentation linked in the first page for another explanation. You actually have 32 layers if you treat layers as hexadecimal.

    “Bit wise and” is a way to check if two numbers have bits in common.

  • Hi, R0J0hound

    I am trying to make my own ragdoll system with your physic and Spriter. My problem:

    when I spawn physics sprites, it inherit angles of spriter animation. So, for example: head has 3 degrees and body has 355 degrees. I connected it with piviot joint which is works nice, and rotary limit joint (limits: -50 and 50), which brake everything, because the limits between 355(body) and 3(head) too big for chipmunk math(but we understand it just 8 degrees). meanwhile if I turn a bit the spriter animation, and body becames 5 degrees and 13 for head, all works ok.

    Any idea?

  • When I check the collision layer expression, it gives an odd number.. how do I translate it to the 00000000 format?

    for example I get 268435456 but I need it to read 10000000 (the layer it is set at)

    nvmind.. I'm implementing an expression into my own plugin that will do this.. i found way to convert using javascript

  • Hello R0J0hound - I am attempting the old chestnut "Weld two objects together so they act like one object".

    While I think it can be achieved using joints this seems unnecessarily inefficient.

    I noticed in the Chipmunk documentation - "You can attach as many shapes to a single body as you need to in order to define a complex shape." - this seems much more like what I want.

    Is there any way of doing this with your plug-in?

    I suspect the answer is No given the constraints of how Construct 2 works, in which case what joint do you think might be the least inefficient way to achieve this?

    Cheers,

    RR

  • RattyRat

    You can't do that with the plugin, and modifying it to do so will have lots of caveats. The idea came up when I was making the behavior but I opted for making things easier to use. It's something best served by a ground up re-write and re-design of how it deals with the js library. I'm not really modifying or creating plugins or behaviors lately though. Lots of work for little gain imo. I have other more entertaining and interesting projects i'd want to do first, but if those succeed I may not be back.

    Anyways, the behavior manages the conversion of c2 coordinants to chipmunk coordinants, and vise versa. The complication is c2 uses the origin as the object center and chipmunk uses the center of mass (COM). To have multiple objects welded together they'd have a shared COM, and it would have to be updated every time things are moved with anything but the physics engine. There are other properties that would need to be updated as well. At least that's my thought.

    -cheers

  • Thanks. I thought that was probably the case but still best to ask before throwing in the towel.

    I`ve been thinking of moving away from Construct anyway (I don`t like the pricing model for Construct 3) - Think I`ll go check out Unity...

  • RattyRat

    You could also look at another paid for box2d plugin. I think they have that feature there.

    A game engine from scratch is more appealing than unity. At least to me.

  • R0J0hound

    Ooh, thanks, I had never spotted there was another Physics behavior (assume you mean https://colludium.itch.io/box2d-plus ). It does look like it does what I want, I think it is probably worth risking £5.99.

    I still intend to learn Unity, I want more control than C2 gives me, I keep getting off to a good start with my ideas only to get stuck trying to do the fiddly bits. I imagine I`ll end up using C2 for rapid prototyping before writing the full game in Unity (or whatever).

    Incidentally a recent mail from Unity was suggesting you can now make an entire 2D game in it without writing a line of code. Hmmm, well we`ll see!

    Thanks again,

    RR

  • RattyRat

    I will say that don't buy the Box2D+ behaviour, I had purchased it and tested it with bike physics, but when I crash the bike into some other object then the wheels just move from the position they are attached to and stay like that only, so I returned it and got refund.

    now I'm back to default physics and I don't have such problems with it and it is much easier.

    you might need it for some other function so buy and test it properly, if it breaks then just email the developer to fix the problem.

  • Drago_18 - Thanks, I`ll make sure I have the time to test it properly before I buy it then. Mind you, one of the examples seemed to do exactly what I wanted.

  • In fairness, Drago_18, you never sent me a bug report so I have not been able to investigate the problem you had. In our last communication you asked me to help you make your bike do backflips and I declined because I didn't have time to make the mechanics of your game for you. Sorry, R0J0hound, it's not my intent to highjack your thread and I won't interject any more.

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