asm.js

0 favourites
  • 13 posts
  • Hi everybody.

    I recently read about the new asm.js engine that is available, and have a question.

    ..Click Here for Ashley's article on asm.js

    I see that the article says for physics, but is it exclusively for physics or will it speed up everything, for example particles?

    Has anyone tested this yet?

    Maybe I will try to apply asm.js to the Space Blaster game to see if there is a difference.... that game is unplayable on my iPad, just too many particles. I just have to use Chrome browser it looks like.

    Ashley

  • It only applies to physics.

  • Ashley, thanks for replying to this post, I am sure others were wondering the same thing.

  • Ashley

    Any plans on expanding asm.js support to other plugins in the future?

  • It's not easily possible unless there is a good existing C++ library that can be compiled to asm.js to cover the same functionality as the plugin, and it's only worth doing if the performance of the plugin is a possible bottleneck. So far only Physics stands to benefit: there is a good existing compile of C++ Box2D to asm.js which is pretty closely compatible with what the behavior already does, and it is often a bottleneck.

  • Ashley

    I was wondering if you would kindly make particles a physics behavior then. Particles are the biggest performance killer for C2

    and I wonder how many customers are lost because of it?

    for example

    ..http://www.scirra.com/forum/impossible-in-iphone_topic80572.html

  • Ashley

    I was wondering if you would kindly make particles a physics behavior then. Particles are the biggest performance killer for C2

    and I wonder how many customers are lost because of it?

    That is a silly thing to say. I very seriously doubt Scirra has lost custom due to particles.

    In my experience, particles are pretty useless and easily re-creatable using sprites, with much greater control.

  • then try playing space blaster on a mobile device ...

    it's completely unplayable (on my iPad.)

    and

    this is one of Scirra 'featured' games.

    People are making games for mobile devices,

    I am waiting for C2 to get faster, but how many

    are just moving on to the next product?

    and

    if you looked at the link I provided earlier.

    This is a recent topic on the forum, and just one regarding this very subject....http://www.scirra.com/forum/impossible-in-iphone_topic80572.html

    do you think that guy will buy C2? probably not.

    and that guy has so few particles running and still posts a negative comment about C2 calling it worthless.

    I mean, these kinds of posts should be avoided at all costs, I would think.

    In fact, I'd like to make the entire game with this asm.js engine actually.

  • I can guarantee particles would be a great deal slower if they were implemented using Physics. Particles are actually pretty lightweight, but they tend to strain the renderer if you spray thousands and thousands of them.

    In that thread the user said they were using iOS 5, which is pretty old now! iOS 7 is waaay faster, and it looks like on page 2 they resolved the performance issue as something else (it wasn't particles).

    Space Blaster runs a nice 60 FPS on an iPad 2 with iOS 7 for me. What have you been testing on?

  • Though it's generally not a bottleneck, I'm curious if non-physics collision detection could be sped up with asm.js. A prototype side scrolling shooter I fiddled with a while ago could have used it.

  • I just updated to iOS 7 , let me try that ... thanks

  • Well I just tested Space Blaster on my Ipad iOS7 , yes works much much better. Thanks Ashley.

  • Try Construct 3

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

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

    As for collision. C2 just needs to use a Quadtree system like

    mikechambers.com/blog/2011/03/21/javascript-quadtree-implementation

    C2 uses a brute force. so when a check type is used C2 checks ALL of them. Where as a good quadtree is more effecient :) but i'm sure some day :)

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