Jump to content

Accelerometer


Guest friedgoldmole

Recommended Posts

Guest friedgoldmole

I have seen posts about the accelerometer not working in games, and it was suggested it was only a 4 point sensor, however it seems its just really slow to react, which is weird considering the screen orientation seems to change pretty quickly.

Did a quick video of a spirit level app, its seems to be able to accurately determine the rotation of the device but reacts really slowly. I wonder if this could be sped up in the firmware?

http://www.youtube.com/watch?v=TBjRBYtHl-c...be_gdata_player

Link to comment
Share on other sites

Guest SilentMobius

Did you switch on the g-sensor "game mode" in settings? I have no problem with the response with that on. My problem is that the sensor appears to be 180deg out compared to a standard android phone. This is fine if your game calibrates itself, but is unusable if it doesn't. Download "accelerometer values" from the market, that gives you a better idea of the exact values on all 3 axes.

Link to comment
Share on other sites

Guest friedgoldmole
Did you switch on the g-sensor "game mode" in settings? I have no problem with the response with that on. My problem is that the sensor appears to be 180deg out compared to a standard android phone. This is fine if your game calibrates itself, but is unusable if it doesn't. Download "accelerometer values" from the market, that gives you a better idea of the exact values on all 3 axes.

do you have an example of a game that recalibrates?

Link to comment
Share on other sites

Guest paulswift36
SpeedX 3D does a calibration when you start a new game (and is awesome on my HTC Desire, but screen blanks since the performance pack install ;) ).

I've got SpeedX working and is one of the few that does seem to work okay although its not where near as responsive as on my Desire. I get problems where some games around 90 degrees out as well as 180. Seem that the firmware is just bad on this. I can also crash Angry Birds buy playing it flat on the ground and moving the tablet about a bit, as if the screen cannot cope with a few quick changes. The sounds carry on but the screen freezes and a reboot is required.

It is odd because browsing and screen orientation work really well, perhaps too well sometimes.

At the moment this is my only real criticism of the device so I'm prepared to lock the screen to one angle for now and not play games that wont work.

Link to comment
Share on other sites

I can also crash Angry Birds buy playing it flat on the ground and moving the tablet about a bit, as if the screen cannot cope with a few quick changes. The sounds carry on but the screen freezes and a reboot is required.

Don't really understand why that would be the case .. Angry Birds doesn't use the accelerometer, so why would it be affected by it?

Angry Birds works fine on mine no matter what i'm doing with the device

Link to comment
Share on other sites

Guest Graham Macleod
SpeedX 3D does a calibration when you start a new game (and is awesome on my HTC Desire, but screen blanks since the performance pack install ;) ).

I've got it working too, but it isn't right. The controls are off and behaviour is unresponsive and strange. Shame because it looks great! Doodle Jump is interesting. It almost works but the control is backward, you have to tilt the wrong way. It does look as though the accelerometer has the x and y the wrong way round.

Link to comment
Share on other sites

Guest friedgoldmole
I've got it working too, but it isn't right. The controls are off and behaviour is unresponsive and strange. Shame because it looks great! Doodle Jump is interesting. It almost works but the control is backward, you have to tilt the wrong way. It does look as though the accelerometer has the x and y the wrong way round.

Yes having tried a few games which do calibrate I've not seen any that work correctly, something is happening but its not right and not playable.

Link to comment
Share on other sites

  • 2 weeks later...
Guest ColonelK

The accelerometer seems to be very slow in the apps that I've tried.

When stationary (with "Game Mode" disabled), the Vega accelerometer values are (approximately):

(0,0,10) flat on table with screen facing up

(10,0,0) landscape with camera up

(0,10,0) portrait with camera right

Update rate seems to be about 3Hz (regardless of SENSOR_DELAY_xxx).

Switching on "Game Mode" seems to:

* Invert the X and Y axes (but not the Z axis)

* Make no difference to update rate

The Sensor getName() function returns "BMA150 Accelerometer".

Link to comment
Share on other sites

Guest worto03

Sorry if this is going a little bit off topic but I'm interested in this bit

Angry Birds works fine on mine no matter what i'm doing with the device

It works on mine OK unless you zoom out then try using it, it becomes really unresponsive and jerky & if you try to fire a bird quickly it just locks up every time almost as if the vega can't handle it, is this an issue with just mine or would it be improved with the perfomance pack?

I have the r4 custom rom on but not the performance pack.

Thanks,

worto.

Edited by worto03
Link to comment
Share on other sites

Sorry if this is going a little bit off topic but I'm interested in this bit

It works on mine OK unless you zoom out then try using it, it becomes really unresponsive and jerky & if you try to fire a bird quickly it just locks up every time almost as if the vega can't handle it, is this an issue with just mine or would it be improved with the perfomance pack?

I have the r4 custom rom on but not the performance pack.

Thanks,

worto.

As I said Angry Birds doesn't use the accelerometer in a any way so if it's affecting the game then there must be something else going on with the device. Might be faulty

Link to comment
Share on other sites

Guest worto03
As I said Angry Birds doesn't use the accelerometer in a any way so if it's affecting the game then there must be something else going on with the device. Might be faulty

Thats whats worrying me - I'm not bothered about the accelerometer bit of this thread I was just surprised that other people have angry birds working 100% while mine seems to struggle and locks up when zoomed out.

If it's working OK for you do you have the performance pack installed as I don't so if it's just that I'm not worried.

Edited by worto03
Link to comment
Share on other sites

Guest Cwmdu86
Thats whats worrying me - I'm not bothered about the accelerometer bit of this thread I was just surprised that other people have angry birds working 100% while mine seems to struggle and locks up when zoomed out.

If it's working OK for you do you have the performance pack installed as I don't so if it's just that I'm not worried.

I occasionally get lockups when zoomed out and have the performance pack installed.

Switching of (short press/standby) and on again then holding the menu button down for 20 - 30 seconds brings up the force stop/wait window and I can then use it again.

Will try without being fully zoomed out and see if it makes a difference.

Link to comment
Share on other sites

Guest removed-14
Also had angry birds lock up here too.

Just started having a couple of lock ups in Angry Birds seasons last night. Up until last night it worked flawlessly.

Link to comment
Share on other sites

  • 3 weeks later...
Guest Graham Macleod
The accelerometer seems to be very slow in the apps that I've tried.

When stationary (with "Game Mode" disabled), the Vega accelerometer values are (approximately):

(0,0,10) flat on table with screen facing up

(10,0,0) landscape with camera up

(0,10,0) portrait with camera right

Update rate seems to be about 3Hz (regardless of SENSOR_DELAY_xxx).

Switching on "Game Mode" seems to:

* Invert the X and Y axes (but not the Z axis)

* Make no difference to update rate

The Sensor getName() function returns "BMA150 Accelerometer".

There's an application in the Market called "Acceleration Sensor" which shows what's going on with the Accelerometer. Looking at it I can see why games such as Abduction and Doodle Jump behave so strangely - the 'ball' is supposed to be at the bottom of the screen - instead, for the default orientation it's off to the left.

What is very peculiar though is that the Oracle Widgets come with a 'Bubble level' app as part of the demo, and that works flawlessly. There's also an equivalent application to 'Acceleration Sensor' which just reads out the values. Comparing this with the same widget on my Nexus One, the values are just the same - exactly what you'd expect.

In fact, comparing the nexus one values to the vega values, on both pieces of software - they are actually the same for equivalent orientation. The problem can't be the values themselves then, it must have something to do with the application's assumptions about what orientation it is actually in, something to do with the vega being in landscape orientation by default perhaps?

I'm pretty puzzled by this.

Link to comment
Share on other sites

Guest arad85
There's an application in the Market called "Acceleration Sensor" which shows what's going on with the Accelerometer. Looking at it I can see why games such as Abduction and Doodle Jump behave so strangely - the 'ball' is supposed to be at the bottom of the screen - instead, for the default orientation it's off to the left.

Interestingly, if you have the device oriented portrait and upside down, the ball sinks to centre screen "bottom".

Link to comment
Share on other sites

Guest Graham Macleod
Interestingly, if you have the device oriented portrait and upside down, the ball sinks to centre screen "bottom".

Yes, but notice then that the ball moves the 'wrong' way when you tilt. If you consider the default landscape as 'normal' then this 'upside down' setting isn't normally possible on a phone. Perhaps why this program behaves oddly in this position.

I think that somehow the Vega turns the screens through 90 degrees so that landscape is the default. Applications don't realize that this has happened so the correct accelerometer readings are misinterpreted. Or something :-)

Link to comment
Share on other sites

Guest simonta

Apps that get the orientation wrong is down to the developer making assumptions (or not bothering to check at all) about the default orientation for devices. Only solution is for the dev to update the app or wait for some smart cooky to develop an app which can fool other apps about the default orientation.

The reason Angry Birds might be affected is due to the way Android handles rotations. There are 2 ways to do this:

1. If the app doesn't do anything special, when the rotation changes it will be shut down and restarted. If the app is just using "normal" interface components like text boxes, buttons, labels etc, then there is nothing the developer really needs to do. But for an application which is drawing all of it's own graphics, like Angry Birds, the entire display will be redrawn in the new orientation. The app must also take care of ensuring that the state of the app is exactly the same before an after the rotation.

2. The app can tell Android not to close it when the rotation changes but instead, to call a special function inside the app. The developer must write code to respond to this function and do the neccesary.

I don't know which method Angry Birds uses (anyone who wants to figure it out might take a look in logcat) but both methods provide opportunities for bugs to impact the redrawing and therefore cause crashes. In summary, any app, whether it uses the accelerometer or not, is subject to bugs in Android or bugs in itself when the rotation changes.

Cheers

Edited by simonta
Link to comment
Share on other sites

Guest ColonelK
There's an application in the Market called "Acceleration Sensor" which shows what's going on with the Accelerometer.

Thanks for the pointer, that's useful.

It does sound as if there are known problems with orientation on tablets:

http://android-developers.blogspot.com/201...es-another.html

Perhaps Google have a "gold standard" sample that demonstrates how to use the accelerometer on all devices... or is that wishful thinking :unsure: I'm also hoping that there will be some way to get a faster update rate from the Vega accelerometer. Perhaps when they release the kernel source that can be fixed.

When you flick the screen rotation lock switch, the accelerometer on the Vega returns (0,0,0) - does anyone know if this happens on other Android devices? Anyway, this could at least be used to determine whether the Angry Birds lock up is due to the accelerometer - i.e. if you turn on screen lock and it still crashes, then it isn't the accelerometer at fault, just a bug in the app. I've seen Angry Birds crash (not often) but not sure if it has anything to do with the accelerometer.

Link to comment
Share on other sites

Guest newbe5

OK, this might have already been covered, but I have just done some testing using an app called "Floating Image" which is an amazing Gallery app for well-powered android devices, and Raging Thunder 2 Lite on my Vega. Here are the results:

Floating Image:

When using Floating image, the app thinks I should be in portrait mode, and doesn't rotate properly. Luckily, in the app settings, there is a "Force Rotation" setting, so I can force the screen to start 90 degrees rotated, which makes it work. The app has g-sensor capability built-in, so when you rotate the device, it rotates the app display. Now, I had this app running for a few hours yesterday on my desk at work as a sort of picture frame, and noticed that every now and again, the app would rotate 90 degrees as if I had rotated the Vega, then quickly correct itself again. This happened with varying frequency and was quite annoying and ruined the whole experience.

I have now FIXED this in the most unusual way. turning on the screen-lock button on the top of the device, prevents screen rotation, and resolved the issue, but prevents the screen from ever rotating in the app, even when you want it to, however. If you go in to settings on the Vega, then display settings, then UN-TICK "Allow Screen Rotation" (and leave the hard screen lock OFF on the device itself) this now works. Granted, a lot of apps (such as Alkido) now will not rotate, but for some reason, Floating image DOES, and it no longer gets the strange sudden 90 degree rotation issue. Also, despite this setting being turned off, G-Sensor tilting in the Gallery3D app still works, although it will NOT rotate the screen from landscape to portrait anymore...

Raging Thunder 2 Lite:

This is actually pretty simple. Turn on the G-Sensor Game Mode Using this game (despite the fact that it does not open in full-screen mode), when you start a race, the car immediately turns to the right, and drives directly in to the wall. So, if you rotate the Vega 90 degrees clockwise, and tilt your head (as the game does not rotate), it now WORKS. The sensitivity is good, steering WORKS correctly as far as I can tell, although it is very hard to steer :unsure:

So, the G-Sensor is NOT just a 4-axis sensor as some believe, it is actually a fully-sensitive sensor it just appears to be calibrated incorrectly. And it appears that most games sense that the default orientation of the device (ie... DOWN) should be when it is held in portrait, rather than landscape mode, wheras the Vega is defaulted to landscape. This appears to be what is causing most of the issue.

Another thing I have noticed in some apps, is that turning on the dubious G-Sensor "Game Mode" appears to flip the default G-sensor orientation by 180 degrees. Which oddly, fixes nothing, and for example in Raging Thunder 2 Lite this is what causes you to drive into the right-hand wall. without this setting on, Raging thunder steers you in to the LEFT wall. You can still steer but now you have to turn the device 90 degreed anti-clockwise, and tilt your head B) I have hi-lighted the previous sentence because I believe this is 100% of what is wrong with the g-sensor for a lot of games. The "Game Mode" setting rotates the g-sensor "Down" calibration by 180 degrees, when it seems that is SHOULD actually be changing it by just 90 degrees. If this was the case, then games such as Raging Thunder would work correctly. The same thing also happens using the Floating Image app, if "Game Mode" is off, then the app opens 90 degrees rotated anti-clockwise, if it is ON then it opens 90 degrees rotated clockwise. The "Game Mode" setting is rotating the calibration by 90 degrees too much.. I'm open to suggestions if you think I am wrong!

So, those are some results, and if anyone is still thinking that the g-sensor is only 4-axis, if you turn OFF screen rotation in the android settings, then load the picture gallery and tilt the screen, you get an incremental tilt, so presumably with some kind of Firmware update, this CAN work. Fingers crossed!

newbe5

Edited by newbe5
Link to comment
Share on other sites

Guest Lennyuk

I have only tried to test SpeedX but I had the blink screen issue once installed too, anyone have any idea why this is?

Or alternatively anyone who has SpeedX working do you have the performance pack installed?

Link to comment
Share on other sites

Guest newbe5

Forgot to mention in my post above, but I am running 1.06.5 with Paul's r6 mod WITH performance pack. No idea if the results are different without the pack?

Also, seems like a stupid suggestion, however, after using some accelerometer testing aps on the Vega, it seems as though this entire issue could be fixed if we simply swapped the values for X and Y. X is showing at -10 in Landscape, while Y is showing at 0, and vice-versa in portrait... If these were flipped then I bet that most if not all games would work correctly in landscape.

EDIT: Just checked and this appears to be EXACTLY the issue. X is supposed to control Left and Right, NOT up and down as it does on the Vega. Flipping these values should solve the entire issue. Anyone know how to do this?

Edited by newbe5
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.