[BEHAVIOR] Chipmunk Physics

From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • Updated the web version without minify and it works ok there now.

    Just tried it with webGLoff and minify on. Still no joy

  • Can you run your nw.js exported exe from the command line with the --enable-logging switch? It will make a debug.log file that should have the error.

    A simple way to do that is to create a .bat file.

    Open notepad and type in:

    newproject --enable-logging[/code:2p88pw6b]
    where newproject is whatever the exe file is named.
    Next "save as" and call it debug.bat and save it to the same folder as the export.  Be sure to change the "save as type" to "all files" or it will save as a text file.
    Finally run the debug.bat file and the debug.log file will be created.
  • R0J0hound

    This is the debug.log contents.

    [7892:0426/090241:ERROR:nw_shell.cc(335)] ReferenceError: tri is not defined

    at c.Go (file:///C:/Users/chris/AppData/Local/Temp/nw7892_2461/c2runtime.js:408:155)

    at c.ix (file:///C:/Users/chris/AppData/Local/Temp/nw7892_2461/c2runtime.js:411:79)

    at c.fl (file:///C:/Users/chris/AppData/Local/Temp/nw7892_2461/c2runtime.js:415:345)

    at c.tq (file:///C:/Users/chris/AppData/Local/Temp/nw7892_2461/c2runtime.js:413:344)

    at l.Ae (file:///C:/Users/chris/AppData/Local/Temp/nw7892_2461/c2runtime.js:125:460)

    at l.It (file:///C:/Users/chris/AppData/Local/Temp/nw7892_2461/c2runtime.js:174:437)

    at m.an (file:///C:/Users/chris/AppData/Local/Temp/nw7892_2461/c2runtime.js:158:259)

    at l.nv (file:///C:/Users/chris/AppData/Local/Temp/nw7892_2461/c2runtime.js:108:181)

    at l.go (file:///C:/Users/chris/AppData/Local/Temp/nw7892_2461/c2runtime.js:105:334)

    at file:///C:/Users/chris/AppData/Local/Temp/nw7892_2461/c2runtime.js:107:184

    [7892:0426/090241:INFO:CONSOLE(408)] "Uncaught ReferenceError: tri is not defined", source: file:///C:/Users/chris/AppData/Local/Temp/nw7892_2461/c2runtime.js (408)

    [7892:0426/090243:INFO:CONSOLE(4)] ""[Construct 2] Suspending"", source: file:///C:/Users/chris/AppData/Local/Temp/nw7892_2461/c2runtime.js (4)

  • Try Construct 3

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

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

    Hmm, best I can tell "tri" is some minified variable name, so I have no way of knowing where to look. I'm not getting an error on my machine when exporting as a minified nw.js.

  • R0J0hound

    I could pm you the capx if you think it might help ?

  • spongehammer

    It might. It could be there is some function that I need to tweak that isn't being used in my tests.

  • Upadated to 2.2d

    spongehammer

    I think I fixed it. It was caused by using polygon collision shape and there was an uninitialized variable named "tri". After that I found another bug by turning on "use strict". It should work now. Also I fixed a bug with paster when webgl isn't available that your capx exposed.

  • R0J0hound

    What a genius thanks. I had seen the problem with paster but not realized it was a bug.

  • I was about to write about minify blackscreen but new version fixed that!

  • It's not using the object's origin, it's just using the center of the object regardless of where the origin is. It was an oversight to not take into account the center of a polygon shape. I'll be taking a look into it.

  • I'm trying to use this plugin for my top-down game. I found a tutorial that shows how to do this, but I need to be able to change the "maxBias" property of a joint. I can't seem to find a way to do this- is there one? Thanks.

  • what is the best way to stop bridge vibration (I attached capx file)?

    https://www.dropbox.com/s/9ludf1q1ne148 ... .capx?dl=0

    I have a few possible solutions:

    1) if both joint impulses are great than some limit than set object's max speed to zero;

    2) compensate object's velocity by space damping;

    3) setting damping velocity manually by tracking Y velocity of object.

    R0J0hound, could you help, please?

  • Hey R0jo, I'm still battling that one issue I encountered earlier, and it is quite weird since it only happens in certain levels.

    I have had some difficulty in pinpointing the problem, but now I will scrap rest of my game and try to gather just bare bones version for demonstrating the error.. it happens when you make joints between sprites, and then one sprite's frame has been changed on the fly and it undergoes several collisions. Attached below is what I get in the console:

    Uncaught TypeError: Cannot read property 'parent' of undefined

    subtreeRemove rojoChipmunkBeta_behavior.js:2378

    BBTree.remove rojoChipmunkBeta_behavior.js:2519

    Space.removeStaticShape rojoChipmunkBeta_behavior.js:3961

    Space.removeShape rojoChipmunkBeta_behavior.js:3912

    behinstProto.updateShape rojoChipmunkBeta_behavior.js:6710

    behinstProto.changeShapeCheck rojoChipmunkBeta_behavior.js:7016

    behinstProto.tick rojoChipmunkBeta_behavior.js:7056

    Runtime.logic preview.js:2303

    Runtime.tick preview.js:2056tickFunc

    .capx to be followed as soon as I manage to strip it =)

  • Fizzick

    There currently isn't a way to access that property.

    Valex

    You might be able to set the joints max force to limit the impulses of the joints. Another thing you could try is lowering the fixed time step from1/30 to 1/60.

    Thanks for the bug report, I'll look into it when I have a chance.

  • So I'm late to the party and don't have hours to search through these 30 + pages, how does this work on Mobile devices if anyone has tried? I have my Pixel Golf game running through with Cordova export and it runs quite well on my iOS devices but the physics options are so limited that this would be great if it works well.

    I might just have to try later today for myself, but are there any active examples around of this being implemented for me to see how it runs?

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