Robotun. How it was built
A game whose only control is the phone itself, built out of one gyroscope threshold, a timer that ticks once a second, and a string comparison with no tolerance in it at all.
The engine is four lines long. The gyroscope is polled ten times a second; the average of the three rotation rates, taken as absolute values, is compared with a threshold of 0.08; above it the phone is moving and the sound plays, below it the movement is over. Everything else in the game is built on that one comparison.
Training mode is that engine and nothing else: no score, no rounds, just a phone that answers when you move it. It exists for one trick, which is to push the phone up your sleeve first, so the noises seem to be coming out of your own arm.
Training & Challenge
Training mode — wave the phone however you like, and it answers with robot sounds.
Up a sleeve, the sound stops belonging to the phone and starts belonging to your arm.
Then the robot takes charge
Challenge mode turns the engine around: the robot holds a sound for a count of seconds, and you have to hold a movement for the same counts. The answer is written down as it happens, one mark for every full second the phone keeps moving, with a separator between movements, and the robot's task is written down the same way. Then the two strings are compared for exact equality. There is no tolerance anywhere in that comparison, which is why half a second in either direction is already a lost heart.
The task grows with the score on a fixed ladder: one movement while you are on nothing, two from the second point, and past thirty points anywhere from twelve to fifteen of them, each running up to seven seconds. No movement is ever shorter than a second.
The robot itself is not a sprite sheet but a Lottie animation, which is why it can wave on the landing page as the same file the app plays. Free, no purchases, 4+, English and Russian, about eleven megabytes. The background soundtrack is by Anton Dukanich.
More projects