Box2d and asm.js

0 favourites
  • 10 posts
  • Here's a comparison of ports of box2d. Its an interesting read when box2dweb is compared to asm.js

    click here

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • We've actually experimented with an asm.js-powered version of the Physics behavior already. It was a lot faster on Firefox and Chrome, but considerably slower on IE and Safari (including iOS). It's hard for us to switch to it or even provide it as an option when performance is so unpredictable. Hopefully in future asm.js will be more widely supported and we'll be able to make the switch without making anything slower.

  • Ashley - it was faster on chrome? Does that mean chrome supports asm.js now?

    Again I feel that such things could be useful for those of us not targeting the open web, but rather nodewebkit and possibly cocoonjs specifically.

  • Arima - Chrome have announced the intention to support asm.js, but in the mean time they've made the ordinary V8 engine better at handling it, so it's still quite fast.

  • Ashley

    Glad to hear you're trying out ASM.JS for some improvements.

    Widespread ASM.JS support won't be here for a while because of the update schedule of many browsers don't have it as a priority, however I was wondering if in the future there could be an project option to use ASM.JS versions of plugins rather than the default ones.

    Sort of how you can enable/disable WebGL for a project, but for ASM.JS. With Chromium's improvement and Firefox support it should cover a large enough user base, along with potentially making Node-Webkit run even faster. Faster NW support means people can do more and make games with speeds even closer to native languages. (would love to see a ASM.JS optimized benchmark with the C2 engine on Node-webkit :3)

  • Yeah - we can already select either the accelerated or non-accelerated version of physics for cocoonjs - so could it be made that c2 automatically uses the asm.js version when exporting to node webkit, or having an option somewhere so we could decide for ourselves? Or perhaps include both in the exported game, and automatically use the asm.js version if it's a browser that supports it, and otherwise revert to the previous version?

  • Well it could be used more than just the Physics plugin as well.

  • Is ASM.JS physics meant to work with Node-Webkit export? Becos when I export an .EXE and i double-click and nothing happens, my game EXE doesn't run or open.

    But when I switch back to the old Box2D physics then Node-Webkit export works just fine and my game EXE runs and plays.

    My issue with the old Box2D physics is that I get irregular pauses and freezes in my game that can stop for a few seconds, but in Chrome preview with ASM.JS I played my game for a long time and while it had some mild occasional stutters, it never stopped for a few seconds.

    Please Help!

    -----------------------------

    OK I figured it out!! So guys you need to turn off "Minify Script" if you want to use the newer ASM.JS Physics with Node-Webkit desktop export.

    P.S. I'm guessing becos asm.js is almost like assembly/machine code, then minifying that would turn crunch it into nonfunctional noise.

    (this may not be the case in future versions but for r161 it's what has worked for me)

  • EddyDingDongs - asm.js physics should work even when minified. Please post a bug report if you have trouble with that.

  • Ashley

    Exactly the same here too.

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