Friday, July 22, 2016

How to Create a Pokemon Go Type Game

Niantic is an established leader in location based games and has already enjoyed popular success with their Ingress game. However the stratospheric success of Niantic's Pokemon Go means that the potential for location based augmented reality games is finally being more widely recognized. There is no doubt that the popularity of Pokemon Go means that there will soon be many imitators.

So - how do you create a game like Pokemon Go based on location data?

1. Build a Database of Points of Interest

There are obviously many elements to Niantic's Pokemon Go. At the heart of the game, however, is the placement of Pokemon in the real world. In essence Pokemon are mapped to particular locations in the real-world based on Niantic's database of points of interest.

At a basic level features in Pokemon Go are mapped like this:

Places of Interest: Pokemon
Public Spaces: Gyms
Water - Water Pokemon

Niantic's database of points of interest comes from users of Niantic's Ingress game. Niantic Labs began as an internal start-up at Google, Therefore it is safe to assume that the original data behind Ingress and Niantic's earlier mobile guide 'Fieldtrip' (showing nearby places of interest) came from Google Maps.

Players of Niantic's Ingress were encouraged to submit points of interest to the game. This has enabled Niantic to extend their database of interesting places - particularly in areas which lacked data in the original game.

At the heart of Ingress' original database were locations which had some 'cultural' interest. This is important to the success of Niantic's location based games. It means that when players visit real-world locations while playing Ingress or Pokemon Go there is usually something interesting for players to see.

So how do you create a database of POI's?

If you don't want to start from scratch you could always use something like Google Places or Mapzen's Who's on First gazetteer.

Alternatively you could use OpenStreetMap data. Using the Overpass API you can select and download OSM map data. For example (copying Niantic's preference for places of cultural interest) you could use the Overpass API to download the locations of all buildings in a city tagged 'museum' and 'gallery' to build a database of museums and art galleries.

2. Create a Base Map

Pokemon Go appears to be using Google Maps for its base map of streets and location data. If you also want to build upon the success of Google Maps you could use the Google Maps API, the Google Maps API for Android and the Google Maps SDK for iOS.

The disadvantage of using Google Maps is that you only have limited options for creating your own map style. Mapbox and Mapzen have both written recent posts about how you can create a base map similar to that used in Pokemon Go. If you want to create your own map style based on OpenStreetMap data then you could always use Mapbox Studio.

3. Find Your Users Location

Once you have a database of interesting locations and a base map on which to place them you have the basic requirements for your game. However you will need to check your user's location before showing them their nearby points of interest.

To do this you could use a geolocation service, such as the Google Geolocation API or the Geolocation API.

Alternatively you could use geo-fencing to determine when a user enters a predefined geographic area. You can use geo-fences to define an area around a location and trigger actions on your map based on when users enter your defined area.

4. Create an Interesting Game

Now comes the hard part. Once you have a database of interesting places, a map and a way of checking your users' locations you now need something fun for them to do. This is where you need to get creative and come up with your own ideas.

The potential is limitless but you might want to consider location based ideas such as,

finding, dropping, training objects /characters
buying, selling or capturing territory
finding or hiding virtual objects (a kind of virtual geocaching or virtual treasure hunt)

No comments: