Making sense of the TabletPC Accelerometer, round II

Ahh. The Sunday’s post about the little toy for playing with the accelerometer of certain tablet pcs had a notable success. Evviva! 🙂
Few answers to common questions:



  • I DON’T use any Accelerometer API. I’m not aware of any public ones, and that’s the only way I’d make use of them. I instead rely on the utility that comes with the default installation. More in the readme of the toy.

  • The green line which appears on the ball represents the movement vector that the Accelerometer would like to apply to the ball. If the green vector meets a wall cell, there’s good chance it won’t move: everything is discrete behind the scenes, so there may be effects whchc are not the expected behaviour in the continuous. The collison detection algorithm is lousy but conservative: I preferred to have the ball stuck from time to time (and that explains the use of a bumpy texture for the ground. Sneaky, am I not) rather that quantistic effects in which it teleports through walls. It may still happen, but it’s rare. I’m still waiting for my girlfriend to write for me a decent algorithm.

  • the higher the corridor/wall thicknesses ratio, the smoother the motion.

  • The final message is not a schrapnel of a partially successful localization, but it is in Italian by design. Just to add a little of further challenge 🙂

And in the following a grab (made with my imate) of the tablet with the app: given the nature of the interaction, if simply didn’t seem right to take just a screenshot! 🙂


Leave a Reply

Your email address will not be published. Required fields are marked *