I'm creating a simple game which rotates the players' view based on which direction they rotate their phone.
There's a demo here (just tap the three skulls to start).
I'm using the accelerometer alpha input (0-360) to move two identical images across the layout horizontally to create the loop and pan effect:
Unfortunately, it seems a small (but significant) port of Android phones give very touchy alpha values.
The Xperia 'twitches' even in a resting state, and it's not the only device which does this.
I'm wondering how to approach 'averaging' these values without sacrificing too much of the response time to pan the screen. Although, I'm willing to sacrifice this quite a bit, since my game is more of a giant cutscene than an actual 'game'. How would you go about reducing this sensitively programmatically within Construct?
The most generic way I can think of would be to grab as many alpha values as possible over say 0.5 seconds, average them, and then tween the layout to the most recent 'average value'. Is this practical? I'm wondering if there's a better solution, or if my idea can actually work and not impact the performance greatly.