requestAnimationFrame problem (mobile web)

Discussion and feedback on Construct 2

Post » Thu Jan 16, 2014 2:33 pm

Hi,

I'm curently trying to sell some of my games to a publisher, and my games can't pass the tests for one reason :

When touching a link object, it opens a new tab but when you go back on the game, the game is not responsive anymore (freezing). Happens only on Android 4.1.2 on stock browser, but it's a requirement to work on it.

After asking another developer who encountered the same issue, it seems that it's the requestAnimationFrame that cause the problem. I just have to reset it on focus event.

But how can I do it in C2? Is it even possible? Is it not possible to workaround, ie forcing the game to be responsive (set time scale)? I'm such a newbie in programming so it's difficult for me to understand those code things.

Thank you in advance.Lowren2014-01-17 13:14:48
B
22
S
6
G
3
Posts: 59
Reputation: 4,288

Post » Thu Jan 16, 2014 2:56 pm

The Android stock browser is horribly broken and generally very hard to fix issues with. For this type of issue it's very risky to try and fix it, since if we kick off the game loop again using some workaround and that workaround is accidentally applied to any other platforms, then we kick off the game loop twice which will break lots of other games.

Some vendors make modifications to the stock browser, so it may be just that for example Samsung devices exhibit the problem, which could enormously reduce the number of affected users. I've not heard of this issue before either, even though it sounds quite obvious, so I'd suspect this is the case and just one vendor's phones are affected, possibly even just one model.

I'd suggest just telling Android users to use Chrome for Android. Not only is it far more reliable with fewer bugs, but it's much faster too.Ashley2014-01-16 14:57:31
Scirra Founder
B
403
S
238
G
89
Posts: 24,654
Reputation: 196,155

Post » Thu Jan 16, 2014 4:26 pm

The problem is: mobile HTML5 publishers and portals are increasingly demanding about stock-browsers being supported. It was a non-issue a year ago (funny enough), but now it's all different.

Naturally, telling them to tell their users to just go with Chrome is impossible.
B
79
S
29
G
32
Posts: 482
Reputation: 19,915

Post » Thu Jan 16, 2014 4:31 pm

I totally agree with you Ashley, the stock browser seems horribly buggy and outdated.
The problem is the majority of publishers absolutely ask the game to work on it. In my problem, the issue occurs only on Samsung Galaxy Tab 2 and Samsung S3, on 4.1.2 on stock browser :P It's a very precise situation.

I just hope they will accept my games despite that but that seems compromise. Some of them refused games before because of stock browser issues with C2 -_- So to other developers: be very careful and test the games on every platform possible.
B
22
S
6
G
3
Posts: 59
Reputation: 4,288


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests