Snake

imageWell, that ended a month of evening and night coding, which resulted in another toy for Android. After all, programming is fun, when you create a world of its own, write the rules of this world. Yes, not to have illusions — the toy is very simple — the good old Snake.

Why I wanted to write? Now no longer remember, probably just came up with the idea, and the brain got ahold of her and didn't let go until the idea become more or less finished form toys.

Here are some screenshots:
image image image

Interesting — the snake is controlled using the accelerometer (this is necessary to tilt the phone, so snake change direction), well, apart from the birds in the game there are still carrots, lemons, mushrooms, frogs, chickens, and other objects.

The game has 15 levels, but I think ultimately will be levels 50, although maybe more, how much is enough patience.

To satisfy their own ambitions, laid the toy on Google Play: play.google.com/store/apps/details?id=ru.crazyprojects.android.snake#?t=W251bGwsMSwxLDIxMiwicnUuY3Jhenlwcm9qZWN0cy5hbmRyb2lkLnNuYWtlIl0. but it is not very effective.

What was interesting in the design, perhaps it work with the accelerometer, and of course inventing objects and game levels.
As it turned out, not all accelerometers work in the same way, that is, not all devices accelerometer gives an appropriate value when device is tilted, this on some devices, for example, may be reversed move up-left or up-down (that is, tilt the device up, and the snake creeps to the left). But I think it's the theme of separate articles right now while they do bypass this annoying fact.

PS For the fan to dig deeper, you can download the source.
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

Why I left Google Zurich

2000 3000 icons ready — become a sponsor! (the table of orders)

New web-interface for statistics and listen to the calls for IP PBX Asterisk