X Acceleration Tilt is not working in all mobile devices

Discussion and feedback on Construct 2

Post » Wed Feb 17, 2016 9:22 pm

I am developing an endless jumper and I need to implement Tilt controls (like in Doodle Jump) in order to move the player left or right.

I realized that the best method to do this, is by using “acceleration X with gravity”. The result was great and it worked fine with my mobile and with some other mobiles as well.

However the feedback from other mobile users was not so great. The acceleration X was always at 0 (zero) for them and the player did not move at all. I told all of my testers to try Doodle Jump, so I can check if it is a problem of their device and their feedback from 7 out of 7 users (with different mobiles) was that Doodle Jump tilt works fine on their device.

I am using Cocoon.io for compiling my game and because I can not really tell if it is a Construct 2 issue or a Cocoon.io issue, this post will be double-posted on both forums.

Thank you in advance.
B
12
S
3
Posts: 19
Reputation: 755

Post » Thu Feb 18, 2016 4:14 pm

The Construct 2 Template of Infinite Jumper uses "Gamma Orientation" for the Tilt controls. It was the first thing that I tried, but it seems that the Gamma orientation is buggy. If you use Gamma and try to lift up your mobile facing you (in 90 degrees) like a desktop monitor, then it doesn't work as intended and the player is moving unpredictably.

Therefore i searched some dev forums and realized that most of the developers are using X Acceleration (with gravity). And it worked like a charm but not on all devices I have tested. The think is, that if it works then it works perfect or it doesn't work at all.

It is weird though that the devices that it didn't work have an accelerometer, and according to their owners, their mobile works perfect in any other accelerometer requesting application. My guess is that it is a C2 issue but I am not quite sure, so I posted this on the cocoon.io forum as well.

I hope that somebody has a solution to this because I really need this.

Thanks
B
12
S
3
Posts: 19
Reputation: 755

Post » Thu Feb 18, 2016 8:08 pm

Yes gamma value inverts at 90 degrees. I've not tried but perhaps inverting values at that angle may help but suspect it will still be glitchy. Or if it were possible to ignore beta/alpha value(i forgot which one applies) orientation. I've not tried acceleration X with gravity. Out of curiosity, the phones that have been tested... what worked and didn't?
My Games on google play

ImageImage
B
31
S
6
G
4
Posts: 97
Reputation: 3,094

Post » Fri Feb 19, 2016 6:02 pm

Right now the devices I can confirm about X Acceleration (with gravity) are:

Working: Motorola Moto G 3rd Gen, Motorola Moto G 1st Gen, Alcatel C7 Pop

Not Working: Motorola Moto E 1st Gen, THL T6 Pro

I have found this link: http://www.sizzle-games.com/Tilt/ which is a Construct 2 example with Gamma Orientation. Now it is clear that the problem is from Construct 2 regarding the Gamma Orientation. If you watch the Gamma values and try to lift up your mobile facing you (in 90 degrees) like a desktop monitor, then the values are unpredictable.
B
12
S
3
Posts: 19
Reputation: 755

Post » Fri Feb 19, 2016 6:34 pm

I am convinced now that this is a C2 bug, therefore I started a new thread on the bugs section here: x-acceleration-tilt-amp-gamma-orientation-problems_t168864
B
12
S
3
Posts: 19
Reputation: 755


Return to Construct 2 General

Who is online

Users browsing this forum: sinistar99 and 5 guests