CocoonJS Screencanvas

Discussion and feedback on Construct 2

Post » Fri Jan 04, 2013 12:16 pm

[QUOTE=Wink]
I just tested it with a endless runner platform game that I have been working on, and unfortunately with a older Samsung Galaxy S running 2.3 OS I am still getting only 6 fps. [/QUOTE]

Only 6FPS? What's your app native resolution? I noticed that in old devices when you use a resolution that is more than half of the GL_MAX_TEXTURE_SIZE parameter (2048 for Galaxy S) there's a huge framedrop.
It might be a coincidence because I don't know how CocoonJS works behind the scenes, and I really don't know how OpenGl works on mobile (neither on desktops ), but try to lower your resolution and make sure that your textures size are equal or less than 1024px, this maked a huge difference for me with older devices.
Anyway, welcome to the android fragmentation hell...
B
11
S
3
Posts: 224
Reputation: 2,028

Post » Fri Jan 04, 2013 1:34 pm

[QUOTE=Knifegrinder] [QUOTE=Joannesalfa]

Sounds good news, would you explain about minor visual glitches?[/QUOTE]

I have some problems with large black tiledbackgrouds used as faders, when you exit a layout they seem to disappear just a few frames before the rest of layout breaking the fading out effect. Anyway this is really a minor issue since this is not happening with stretched sprites.[/QUOTE]

Theres allot more to screencanvas, it is amazing but theres tons of bugs with it

Modern GPUs use double buffering for rendering, which basically means it draws to one buffer on the background while it's displaying the other one, and on the next frame they switch roles.

Screencanvas uses those buffers as the canvas element itself, so as not to use more memory or performance, but the problem comes on the switch phase: if you draw something just one frame, only one of the buffers will have that image, so when it starts switching back and forth you'll get a very epileptic flickering. On iOS we've found a solution, but that doesn't work on Android, unfortunately.

thats the main one. Gameplay as well there are some major hiccups caused by the tag on apple and on android it causes better fps but the smoothness is not as good thats my experience so far with it is that it raises fps but risks of major bugs to occureldods2013-01-04 13:38:13
B
20
S
3
Posts: 109
Reputation: 1,967

Post » Fri Jan 04, 2013 1:48 pm

Thanks for the clear explanation... This makes sense, I'll try to force redraw of flickering elements every two ticks and see if this helps.
B
11
S
3
Posts: 224
Reputation: 2,028

Post » Fri Jan 04, 2013 2:58 pm

@Knifegrinder

In theory you should be able to draw it just 2 times to fill both the back and the front buffer with the image and then stop drawing some devices like the Nexus7 use triple-buffering, so you might have to render things 3 times to fill all buffers there

no need to draw every 2 ticks

yea that response is from an email from ludei when i bumped into a device that had the issue.

the problem wont occur during gameplay but will happen on a layout that is only drawing an image once adding a sine behavior or bullet to a motionless layout will fix the bug.

an on start of layout event would also fix it no need to add anything for the level gameplay just if its a layout that is drawing all images once
B
20
S
3
Posts: 109
Reputation: 1,967

Post » Fri Jan 04, 2013 5:35 pm

Ludei suggested we use screencanvas a while ago and in my testing it only got a few frames per second extra on modern devices (I think I tested a Samsung Galaxy S3). However it sounds like it's a much bigger gain on old devices. Ludei did say there were bugs they're still trying to fix with it though, so on that basis I decided not to support it in the last stable release. I might experimentally turn it on for the next beta release and see how it goes.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Fri Jan 04, 2013 6:23 pm

Thanks Ashley, an experimental flag would be a great thing.

A picture is worth a thousand words.
The upper phone is a Samsung Galaxy S Advance (or Galaxy SII lite, or Galaxy SIII mini, it's the same hardware)
The lower phone is an old Samsung Galaxy ACE.
B
11
S
3
Posts: 224
Reputation: 2,028

Post » Fri Jan 04, 2013 7:05 pm

This is very encouraging. Thanks for the work @Knifegrinder.
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783

Post » Tue Jan 08, 2013 6:04 am

I tested it, and there were quite a few issues.

Hiding and showing layers was funky, fading was funky, and none of the touch was working.
B
22
S
7
G
3
Posts: 189
Reputation: 4,270

Post » Tue Jan 08, 2013 6:50 am

[QUOTE=Knifegrinder]Only 6FPS? What's your app native resolution? I noticed that in old devices when you use a resolution that is more than half of the GL_MAX_TEXTURE_SIZE parameter (2048 for Galaxy S) there's a huge framedrop.
It might be a coincidence because I don't know how CocoonJS works behind the scenes, and I really don't know how OpenGl works on mobile (neither on desktops ), but try to lower your resolution and make sure that your textures size are equal or less than 1024px, this maked a huge difference for me with older devices.
Anyway, welcome to the android fragmentation hell... [/QUOTE]

Thanks for the tips, and suggestions Knifegrinder.

I originally built this game for Windows 8 with a 1368 x 768 resolution. I optimized it as much as I possibly could. But to keep it graphically pleasing, and still have all the necessary game mechanics I will just have to forget about all the 1 to 2 year old devices out there. It runs great as a windows 8 app, and on my Nexus 7 but older smaller smart phones nope.

That's ok though I have a bunch of smaller resolution prototype games I built last year that are now running between 50, and 60 fps. I'm going to dust them off, improve there graphics, wrap them up in CocoonJS, and get back into the mobile market Especially now that Iv been seeing a lot of nice quality Android games coming out of our community lately.Wink2013-01-08 07:35:55
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests