If you have never heard of the game Pokemon Go, we can assume that you are lucky. Pokemon news flashes in the news feeds, crowds of people wander through cemeteries at night and fight for spheres of influence. In Moscow alone, according to MTS, 180,000 people play at Pokemon Go, despite the fact that there has not been an official launch in Russia yet.
We in DaData.ru decided to see how we can help Pokemon lovers.
Pokemon Go is a game based on augmented reality, a way to stretch your legs and have fun. The player walks the streets, the phone vibrates - and a pokemon is projected onto the camera output. Very primitive implementation of augmented reality, but fun. You need to throw a pokeball into a pokemon and catch it, and it is not always easy - strong pokemons are not caught, jumped and resisted in every possible way.
Pokemon appear randomly in different places. To collect them a lot and different, you have to walk a lot. Pokemon more than 150 species, they can be trained, they differ in strength and rarity. Weak and popular Pokemon are found at every step, but the chance to accidentally meet at least one rare Pokemon tends to zero. All players are divided into three factions. The meaning of the game is to capture gyms, gain experience and in-game gold, level up, grow more steep pokemon.
The game is still far from ideal. Periodically, the server falls off, the application hangs. But the saddest thing is that the search for Pokemon is absolutely random. The game has two icons that should facilitate the search - "feet" and "leaves." "Paws" show which Pokemon are next to the player, within a radius of 50-300 meters. But the "leaves", which should show the exact location of the selected Pokemon, do not always work. As a result, you can wander aimlessly for a very long time, because Pokemon appear for 10-15 minutes, and then disappear.
There were craftsmen who dismantled the API and made a map with all the Pokémon. If you want not just to walk, but also to find a cool Pokemon, it makes life much easier. Actually, the card does what crookedly working “leaves” were supposed to do. And it also shows all the pokastopes (places where you can get free experience and useful things) and gyms. With the map it is convenient to plan a route and know which faction controls which hall. You can also look at which pokestops hung a “lure” (lure) - a game item that attracts steep Pokémon for 30 minutes - and be there to catch them.
The card has several problems:
It is necessary to lift the local server. Or use the public version , but it does not have Pokemon from the suburbs, and the result looks like Bosch's “Last Judgment”.
There are problems with entering addresses. Google as a whole copes well with Russian addresses, but sometimes it is unpleasantly mistaken.
As a result, we decided to improve the map in anticipation of the release of the game in Russia. We tried to take into account all the problems with the definition of addresses and usability.
It turned out Pokemon radar :
Automatically locates (browser geolocation).
Allows you to manually enter the address. As a rule, a person knows where he is, or at least can look at the number of a neighboring house.
Entering addresses with autocomplete (via Tips ) - adapted for mobile phones and desktops, the issue is relevant to the city of the user.
Shows pokemon in walking around a given point. If the user moves the screen - shows Pokemon for the current screen.
It shows not all pokestopes (there are too many of them, they litter the card), but only baits.
We made the service solely for entertainment - catching Pokemon is more interesting with it. We hope you come in handy too.
The source code is laid out on githab .
UPD: Radar performance depends on the availability of Pokemon servers. Unfortunately, they often lie . We invite everyone who comes up with a more efficient algorithm for working with Pokemon APIs - forking and improving :–)
Source: https://habr.com/ru/post/306464/
All Articles