CocoonJS Webview+ on iOS8+ (It's FAST!)

Discussion and feedback on Construct 2

Post » Sat Nov 15, 2014 5:45 am

In case anyone is wondering, here's some preliminary feedback for this new mobile option.

I exported my big spacesim Star Nomad (PC version with high-res textures) from C2 using the HTML5 Web export option, zipped the entire folder, then compiled it with CocoonJS version 2.1 set for Webview+.

Gameplay video: https://www.youtube.com/watch?v=G6UPWb-Xe6Y

Some quick setting in Xcode6.1, set for universal and provision/profile set it.. ran it on my iPad Mini 2 and WOW.

It loads much faster (~10s) and even has the progress bar. It also fully supports Fullscreen Scaling Letterbox (prior it would only do Inner/Outer).

I noticed something crazy right away monitoring the device usage.

10MB memory usage!

ARE YOU KIDDING ME?! I've trimmed & optimized it so much to reduce memory use, but on Canvas+ it was using ~170MB memory. On Crosswalk for Android it was ~150MB (due to loading Chromium itself).

I enter the game, fly around, flew to a system where a large fleet fight occurs and watch the usage..

12MB memory. CPU 20% loaded, 60 FPS! Holy mother of gawd... it used to be >100% loaded (hammering 1 core completely with fps dropping to 45 during intense battles, similar to Crosswalk on Android). Now its smooth as silk everywhere (no movement jittery bug like on some PC Chrome versions).

I don't believe it. It's behaving like its running on Chrome PC on my i5-3570K CPU but on a much weaker mobile SOC! :o

I know for certain the low CPU load is real because the iPad remains cold as I play, prior, it would heat up. The side effect is also much improved battery life!

HTML5/C2 is finally shining on mobiles with such amazing performance on iOS. Hopefully with Android L and updates to Chromium for faster JS, we'll get some great performance gains on Android too!

This gives me much more confidence as I make Star Nomad 2, to pile on all the features & effects I had wanted without being afraid it will run like crap on mobiles.

@ludei
@Ashley
BUT.. there's one problem. Audio does not play (no music or sounds). Any other C2 devs had the same issue?
Last edited by Silverforce on Tue Nov 18, 2014 4:00 am, edited 1 time in total.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Sat Nov 15, 2014 9:19 am

Hi @Silverforce
I try also to compile my game Mr. DOT and run under CJS Webview+ and the game run fast! really smooth!
In my game there aren't soundtrack but there are some sound fx (like jump sound, pickup sound ecc..) and all work fine.
But I notice one issue....
in some parts of the tiled background I see some transparent edges, like lines that break the continuity of the tiled backdround....
I usually use the Linear sampling on the C2 setting and on Canvas+ all tiled backgraound are good, but in Webview+ there is that issue!
I try also to use point sampling but the edge of the tiled background are always with that strange 1 px lines on some edges.

You noticed this issue on webview+???+
Or others noticed this?
B
6
S
1
Posts: 62
Reputation: 578

Post » Sat Nov 15, 2014 10:52 am

mollaq wrote:Hi @Silverforce
I try also to compile my game Mr. DOT and run under CJS Webview+ and the game run fast! really smooth!
In my game there aren't soundtrack but there are some sound fx (like jump sound, pickup sound ecc..) and all work fine.
But I notice one issue....
in some parts of the tiled background I see some transparent edges, like lines that break the continuity of the tiled backdround....
I usually use the Linear sampling on the C2 setting and on Canvas+ all tiled backgraound are good, but in Webview+ there is that issue!
I try also to use point sampling but the edge of the tiled background are always with that strange 1 px lines on some edges.

You noticed this issue on webview+???+
Or others noticed this?


So strange that your audio work. May I ask what format you use, Ogg or ?

I used to have that same tile bg problem with crosswalk for android a long time ago on their older version, which they've fixed. But not on CJS Webview+ so far since I have not tested games with tile bgs yet.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Sat Nov 15, 2014 11:05 am

Could the following post from Ashley explain the sound issues?

https://www.scirra.com/forum/no-sound-on-ipad_p854247?#p854247
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 » Sat Nov 15, 2014 11:28 am

zenox98 wrote:Could the following post from Ashley explain the sound issues?

https://www.scirra.com/forum/no-sound-on-ipad_p854247?#p854247


Thanks, I will try to recompile it with those changes. Fingers crossed!

Edit: Tried it, no change, still no audio. Guess have to wait for a fix...
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Sat Nov 15, 2014 2:00 pm

I had that audio troubles too, but that webview+ is AWESOME, my physics game has even better performance than with canvas+, why scirra still not officially support it? I heard that canvas+ is not good, but if i understand it right the webview+ is apple system's webview, phonegap using it too, but cocoonjs is even better (because cocoonjs using the WKWebView instead of UIWebView).
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Sat Nov 15, 2014 2:50 pm

Sisyphus wrote:I had that audio troubles too, but that webview+ is AWESOME, my physics game has even better performance than with canvas+, why scirra still not officially support it? I heard that canvas+ is not good, but if i understand it right the webview+ is apple system's webview, phonegap using it too, but cocoonjs is even better (because cocoonjs using the WKWebView instead of UIWebView).


You had audio troubles? That implies its fixed now, what happen and how was it fixed? :D

It is indeed extremely awesome on iOS8+, feels like the JS engine on Apple is much faster than on PC for a low power mobile SOC to handle my game as well as my Intel i5 Ivy Bridge.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Sat Nov 15, 2014 3:30 pm

Silverforce wrote:You had audio troubles? That implies its fixed now, what happen and how was it fixed? :D

It is indeed extremely awesome on iOS8+, feels like the JS engine on Apple is much faster than on PC for a low power mobile SOC to handle my game as well as my Intel i5 Ivy Bridge.

Nope, no fix for that, i just removed all sounds for now. And i don't think that this problems is caused by a bug above, because it's a safari bug. It looks like a bug in webview or cocoonjs, but there will be no fix for that i guess, because cocoonjs is not supported.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Sat Nov 15, 2014 3:43 pm

Sisyphus wrote:I had that audio troubles too, but that webview+ is AWESOME, my physics game has even better performance than with canvas+, why scirra still not officially support it? I heard that canvas+ is not good, but if i understand it right the webview+ is apple system's webview, phonegap using it too, but cocoonjs is even better (because cocoonjs using the WKWebView instead of UIWebView).


Could I ask a question, I though that webview+, and canvas+ are actually working with the html5 export itself, is that so?

If so, official support from scirra of webview+ itself is actually not adding anything, and that would also mean that it would still work long term wise, as webviews are real browser engines (which scirra supports).
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Sat Nov 15, 2014 4:14 pm

yes probably fast (and phonegab is fast too) because of new api of ios8 but the problem is
That 80% of people are using ios7.X and they dont want to update to ios8, so you will not have a lot of coverage
its sure that webview+ and ios8 api are the future of html5 games on ios and android but for the next 1 year
B
45
S
16
G
8
Posts: 792
Reputation: 8,306

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Cliffu and 8 guests