Ams.js vs Box2d Benchmarks. strange finding

0 favourites
From the Asset Store
Strange factory themed set of tiles for your platformer game
  • jojoe - do you notice those stutters only in asm.js or is it in box2d web as well?

    Ashley - In your benchmarks, do you use gravity? I am just curious. I like box2d over chipmunk, because it seems more stable to me. I used circles bouncing around and added them manually until cpu was where I wanted it. Now that you mentioned iterations, that is definitely something to consider. chipmunk handled more circles in the test but the physics simulation brokedown (I was losing energy in the spheres over time which isn't right).

  • Yes, it was just a big bucket which I filled with circle collision sprites (with gravity so they all fall down). A clear 3x difference in the object count, far higher with asm.js physics. Which makes sense since it's practically a native compilation anyway.

  • Ruskul

    It was Box2D, with and without asm.

    I was testing with NodeWebkit (nw.js) too if that makes any difference.

  • Ruskul Have you set friction to 0 and also built a frame with 0 friction around? It is normal to lose energy when there's friction between objects

  • BouncyTrip - yeah, Friction was all set to 0 in both box2d and chipmunk. Thanks though, that's important. That's a pretty sweet hat.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ruskul Thanks to you for your benchmarks

    Despite benchmarks, I found that on my android device with snapdragon 800 cpu Asm.js often causes some micro freezes of 0.1 seconds circa, instead box2dweb runs smoothly.

    The situation is opposite on pc where asm.js perfectly simulates and box2dweb causes those micro freezes.

    I'll give a try to chipmunk, but I need to say I could never develop my android/iOS game without box2dweb.

  • BouncyTrip - I hear you there. I use physics to large extent and so am always messing around trying to find the best option I can. I find it weird that there is only a few ports to javascript, despite box2d being so popular. It doesn't give a whole lot of wiggle room if something isn't working so smooth.

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