Previewing game from public folder vs Cocoon

Discussion and feedback on Construct 2

Post » Thu Jul 11, 2013 5:57 am

When i preview a game on my ipad, I always get MUCH better performance than when I do it using Cocoon. Wouldnt you think this is backwards though, since Cocoon is as close as you can get to running the app natively?
B
35
S
5
Posts: 411
Reputation: 3,406

Post » Thu Jul 11, 2013 6:36 pm

Even though it seems native, it's not. Two things are holding back performance currently in cocoonjs v 1.3 on iOS - 1, the new version isn't out yet, which has webgl which should be faster than its current rendering method. 2, cocoonjs's JavaScript execution speed isn't as fast as safari's - I seem to recall one of my tests running at something like half the speed safari was. I don't know yet if the soon to be released 1.4 improves on this or not.
Moderator
B
92
S
32
G
33
Posts: 3,005
Reputation: 27,582

Post » Thu Jul 11, 2013 11:56 pm

ah ok, thanks!   So is there any true way to run apps natively? or is cocoon the best option as of now to get C2 apps on mobile devices?
B
35
S
5
Posts: 411
Reputation: 3,406

Post » Fri Jul 12, 2013 4:16 am

I guess it depends on the definition of native. Games in cocoonjs on the surface run same as an app coded in other languages, but it's interpreting JavaScript behind the scenes which isn't as fast as something like c++ or whatever is used for iOS apps. Cocoonjs is sort of like a specialized browser made for games and has specialized features for games that browsers don't have, and is made to appear like it's not really a browser at all. It is also currently the best option, though some have tried game closure and like it, even if it's harder to use.
Moderator
B
92
S
32
G
33
Posts: 3,005
Reputation: 27,582

Post » Fri Jul 12, 2013 5:19 am

i guess im screwed then because im not getting good performance on anything for mobile :( the only time i get good performance is running through a dropbox public link
B
35
S
5
Posts: 411
Reputation: 3,406

Post » Fri Jul 12, 2013 5:59 am

A new version of cocoon js is coming out soon. Try again on that.

Also, there many be ways to optimize your rendering/code.
Moderator
B
92
S
32
G
33
Posts: 3,005
Reputation: 27,582

Post » Fri Jul 12, 2013 3:20 pm

yea were hoping for that cocoon update! Thanks for your knowledge!
B
35
S
5
Posts: 411
Reputation: 3,406

Post » Fri Jul 12, 2013 5:24 pm

Hi @Arima,
but when you tell "optimize your rendering/code" what you mean?
Optimize the code (loops, other) inside the game itself or you mean to optimize something in the code for example after the compilation of the game (so on the javascript files) or what?
Thanks and see later ..
B
88
S
25
G
7
Posts: 49
Reputation: 8,745

Post » Fri Jul 12, 2013 8:58 pm

I'm talking about optimizing the events in C2. Finding things like deactivating collisions for offscreen objects, cycling through instances for intensive events instead of trying to process them all at once, etc.Arima2013-07-12 20:59:35
Moderator
B
92
S
32
G
33
Posts: 3,005
Reputation: 27,582

Post » Fri Jul 12, 2013 9:09 pm

Is there any other way to test these than just knowing what to look for?
B
35
S
5
Posts: 411
Reputation: 3,406

Next

Return to Construct 2 General

Who is online

Users browsing this forum: gameglaux, Mascaroth, Yahoo [Bot] and 7 guests