asm.js

Discussion and feedback on Construct 2

Post » Mon Dec 09, 2013 1:29 am

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.

@Ashleyproducermark112013-12-09 04:23:36
B
35
S
10
G
4
Posts: 250
Reputation: 7,908

Post » Mon Dec 09, 2013 12:40 pm

It only applies to physics.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,228

Post » Mon Dec 09, 2013 1:18 pm

Ashley, thanks for replying to this post, I am sure others were wondering the same thing. producermark112013-12-09 13:20:33
B
35
S
10
G
4
Posts: 250
Reputation: 7,908

Post » Mon Dec 09, 2013 2:44 pm

@Ashley

Any plans on expanding asm.js support to other plugins in the future?
B
21
S
8
G
6
Posts: 346
Reputation: 4,891

Post » Mon Dec 09, 2013 3:28 pm

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.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,228

Post » Mon Dec 09, 2013 7:25 pm

@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.htmlproducermark112013-12-09 19:27:37
B
35
S
10
G
4
Posts: 250
Reputation: 7,908

Post » Mon Dec 09, 2013 7:32 pm

[QUOTE=producermark11] @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?[/QUOTE]

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.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Mon Dec 09, 2013 7:40 pm

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.
producermark112013-12-09 19:59:07
B
35
S
10
G
4
Posts: 250
Reputation: 7,908

Post » Mon Dec 09, 2013 8:31 pm

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?
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,228

Post » Mon Dec 09, 2013 9:06 pm

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.
Moderator
B
93
S
33
G
33
Posts: 3,006
Reputation: 27,719

Next

Return to Construct 2 General

Who is online

Users browsing this forum: 99Instances2Go, blackhornet, Giggle Software, R0J0hound and 3 guests