X Acceleration Tilt is not working in all mobile devices

0 favourites
  • 5 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • 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.

  • 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.


  • 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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • I am convinced now that this is a C2 bug, therefore I started a new thread on the bugs section here:

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)