SlideShare a Scribd company logo
back4app.com
How to build a Pokemon Go App
How to Build a Pokemon Go App
• Back4app provides Parse server service to take care of your backend and APIs
development.
• Parse also provides basic application activity APIs like Login-in, push
notification, payment…etc.
• For this demonstration, we can use Parse Geo Point Service and back4app as
our backend to build a simple Pokémon-Go.
• You can read the original publication on:
http://docs.back4app.com/docs/new-parse-app/how-to-build-a-pokemon-go-
app/
Part 1: Setting up Back4app Parse
on your Unity3d
• Go to https://parse.com/docs/downloads
• Download Unity Blank Project (v1.7.0)
• Download https://drive.google.com/file/d/0B7k7pGQXUypGTWRqS1BqVDB
WQUU/view?usp=sharing for updated Parse SDK for Unity3d
Part 1: Setting up Back4app Parse
on your Unity3d
• Open Unity3d Parse Blank Project -> Click Upgrade if required.
• Replace Asset/Parse/Parse.Unity.dll to the latest one.
• Go to Asset/Scene
Part 1: Setting up Back4app Parse
on your Unity3d
• The Parse Initializer GameObject will miss some scripts.
• Add ParseInitializeBehaviour to it.
Part 1: Setting up Back4app Parse
on your Unity3d
• Type your Application ID, dotNet Key, serverUrl to a parameter from your
Back4app dashboard.
Part 1: Setting up Back4app Parse
on your Unity3d
• Create a GameObject and add script component to the Scene for testing.
Part 1: Setting up Back4app Parse
on your Unity3d
• Add following code to TestParse.cs
Part 1: Setting up Back4app Parse
on your Unity3d
• using UnityEngine;
• using System.Collections;
• using Parse;
• using System.Threading.Tasks;
• public class TestParse : MonoBehavio
ur {
• // Use this for initialization
• void Start () {
• ParseObject testObj = new ParseObje
ct("TestObject");
• testObj["a"] = "HI";
• testObj["b"] = "Back4app";
• Task saveTask = testObj.SaveAsync();
• }
• // Update is called once per frame
• void Update () {
• }
• }
Part 1: Setting up Back4app Parse
on your Unity3d
• Press Play Button on your Unity3d Editor
• Go to Back4app database dashboard to check the success or not.
Part 1: Setting up Back4app Parse
on your Unity3d
• It is connected with your back4app account successfully if you find your
uploaded data in the database.
Part 2: Integrate Google Map
to your Unity3d Project
• To generate the terrain like Pokémon-Go, we need to integrate Google map
your Unity3d Project.
• First, create Plane and Name it as “Map”, create directional light.
Part 2: Integrate Google Map
to your Unity3d Project
• Second, Create a script “GoogleMap” and add to Map Game object.
Part 2: Integrate Google Map
to your Unity3d Project
• Second, Create a script “GoogleMap” and add to Map Game object.
• You can see the original script on:
http://docs.back4app.com/docs/new-
parse-app/how-to-build-a-pokemon-
go-app/
Part 2: Integrate Google Map
to your Unity3d Project
• Untick the AutoLocateCenter.
Part 2: Integrate Google Map
to your Unity3d Project
• Type some dummy parameter to try the Google Map.
Part 2: Integrate Google Map
to your Unity3d Project
• If the plane shows the correct location as your parameter, the Google map is
successfully integrated.
• You can use Refresh method to refresh the Google map to change location.
Part 3: Integrate Character and Interacting
with GPS Data
• Create LocationManager Gameobject and add the following code.
• This code is getting the GPS Data and updating the Google Map when GPS
data is changed.
• You can see the full code on:
http://docs.back4app.com/docs/new-
parse-app/how-to-build-a-pokemon-
go-app/
Part 3: Integrate Character and Interacting
with GPS Data
• Let test the Google map again.
• It is successful if the Google map change when you change the GPS Data
in Runtime.
Part 3: Integrate Character and Interacting
with GPS Data
Part 3: Integrate Character and Interacting
with GPS Data
• After that, create a Capsule as a character and a Cube as Direction of the
character on top of the Google Map.
• (For me, I place the character at X:0 Y:0.07 Z:0)
• Add a compass to your character when you test with your mobile device.
Part 3: Integrate Character and Interacting
with GPS Data
• Make sure your character is located correctly by checking Latitude and
Longitude on Google Map.
Part 4: Generating Monsters on Map (Part A)
• For Generating Monsters, we need to do some calculation on placing the
monster with their longitude and latitude location.
• Because the ratio between Google map, reality and Unity3d XYZ-world is
different.
• To figure out how to calculate the relationship between them, we need
dummy data.
• For more detail : how to calculate.
http://www.movable-type.co.uk/scripts/latlong.html
Part 4: Generating Monsters on Map (Part A)
• First of all, we need to set initial latitude and longitude on Google Map first
(You can choose where you want) and set the Markers on the Google Map.
Part 4: Generating Monsters on Map (Part A)
• Press Run, You will find the label on your Google map.
• PS: The reason why we cannot use the marker to be a monster because it is
combined with the texture.
• The marker itself is a part of the texture but not a Gmeobject so we cannot
do any implementation on that.
Part 4: Generating Monsters on Map (Part A)
• Beside that, we will make some dummy GPS data of monster on Parse server,
later on, so we need to know the corresponding ratio on the monster game
object position.
Part 4: Generating Monsters on Map (Part A)
• After that, we create a cube and place on top of the label.
• Record this position.
Part 4: Generating Monsters on Map (Part A)
• Now, we need to find the exact distance between the player GPS location and
the marker GPS location.
• The distance between start (37.38373, -122.0133) and marker (37.384782,-
122.012893) can be calculated by this script.
Part 4: Generating Monsters on Map (Part A)
• And then calculate the XYZ world distance between the CUBE maker and the
Player Capsule. (-0.563,0.07,-1.915) and (0,0.07,0).
• This is a simple calculation, so I don’t list how to do it.
• After that, the ratio will be found by this equation
• Ratio = XYZ world distance / Exact Distance.
Part 4: Generating Monsters on Map (Part A)
• Once we have this ratio, we able to calculate how far the monster should be
placed according to the Player location.
• However, the possible location still undefined because we don’t have the
bearing between the player and monster.
• To calculate the bearing.
• We can use this code. (You can see the full code on:
http://docs.back4app.com/docs/new-parse-app/how-to-build-a-pokemon-
go-app/)
Part 4: Generating Monsters on Map (Part A)
• After we get the ratio and bearing, it is possible to convert Longitude Latitude
location to be XYZ-world coordination, which means we can place any
monsters with latitude longitude location to correct game world location.
• With the above code, we know the correct XYZ coordination to spawn
monster.
Part 5: Generating Monsters on Map (Part B)
• While we are able to convert Longitude and Latitude data to the game world,
it is time now to create some dummy monster data on Back4app parse
server.
• Go to your Parse back4app dashboard and create a class call Monster.
Part 5: Generating Monsters on Map (Part B)
• Add a column: Location with data type Geopoint.
Part 5: Generating Monsters on Map (Part B)
• Insert some monster dummy row that around you.
Part 5: Generating Monsters on Map (Part B)
• The dummy monsters are set, they are waiting for you to call.
• Then I create a MonsterSpawn GameObject with script Spawn.
• Drop the LocationManager GameObject to it (For getting updated GPS Data)
• M prefab monster for spawning a monster.
Part 5: Generating Monsters on Map (Part B)
Part 5: Generating Monsters on Map (Part B)
• It is time to fetch the dummy monster data from back4app to your program.
Part 5: Generating Monsters on Map (Part B)
• The above code gets the result one by one and converting the GeoPoint data
to be XYZ-world coordination, and then push the result to the List.
• After adding the result is fetched, spawn becomes true to allow program
spawns the monster.
• You can see the full code on:
http://docs.back4app.com/docs/new-
parse-app/how-to-build-a-pokemon-go-
app/
Part 5: Generating Monsters on Map (Part B)
• After the Monsters are spawned, the monsters will keep updating when the
player GPS data has updated.
• Testing. The monster is spawn at correct XYZ coordination with their Latitude
Longitude data.
Part 6: How to move the Player (solve google
map texture slow problem!)
• Until Part 5, the movement of the player is relied on the Google Map texture
updating. However, it is not effective to play it.
• The user experience is not good.
• To solve this problem, we “unlock” the player.
• Make player move on the map.
Part 6: How to move the Player (solve google
map texture slow problem!)
• The algorithm behind is similar to updating the monster.
• We apply on the capsule. compare the last GPS data and new GPS data to
calculate how should the player move in the Game world.
• As we are updating the position of the player, therefore we don’t need
monster update and google map refresh function anymore.
• What you need to do : Modify LocationMaganger.cs
Part 6: How to move the Player (solve google
map texture slow problem!)
Part 6: How to move the Player (solve google
map texture slow problem!)
• You can see the full code on:
http://docs.back4app.com/docs/new-
parse-app/how-to-build-a-pokemon-
go-app/
Part 6: How to move the Player (solve google
map texture slow problem!)
• Second, attach following code to you camera make your cam follow you
character ( Don’t forget to drag your capsule to inspector.
Part 6: How to move the Player (solve google
map texture slow problem!)
• To view source code and whole project -> Raw Unity
Project
• Issues, comments or suggestions? Let’s discuss in
our Developers Group Topic.

More Related Content

Viewers also liked

อุปกรณ์เชื่อมต่อคอมพิวเตอร์
อุปกรณ์เชื่อมต่อคอมพิวเตอร์อุปกรณ์เชื่อมต่อคอมพิวเตอร์
อุปกรณ์เชื่อมต่อคอมพิวเตอร์
Nannapatktwrps
 
Image Slide ( Animal Companion in Maze )
Image Slide ( Animal Companion in Maze )Image Slide ( Animal Companion in Maze )
Image Slide ( Animal Companion in Maze )
tadamasa yamaguchi
 
Push notifications with dashboard and swift
Push notifications with dashboard and swiftPush notifications with dashboard and swift
Push notifications with dashboard and swift
Charles Ramos
 
Estructura naomi hara
Estructura naomi haraEstructura naomi hara
Estructura naomi hara
naomikorin22
 
อุปกรณ์เชื่อมต่อคอมพิวเตอร์
อุปกรณ์เชื่อมต่อคอมพิวเตอร์อุปกรณ์เชื่อมต่อคอมพิวเตอร์
อุปกรณ์เชื่อมต่อคอมพิวเตอร์
Nannapatktwrps
 
อุปกรณ์เชื่อมต่อคอมพิวเตอร์
อุปกรณ์เชื่อมต่อคอมพิวเตอร์อุปกรณ์เชื่อมต่อคอมพิวเตอร์
อุปกรณ์เชื่อมต่อคอมพิวเตอร์
Nannapatktwrps
 
イメージ
イメージイメージ
イメージ
tadamasa yamaguchi
 
Gecko Labs - Our Student Engagement Solutions
Gecko Labs - Our Student Engagement SolutionsGecko Labs - Our Student Engagement Solutions
Gecko Labs - Our Student Engagement Solutions
Gecko Labs
 
Denim Garments Quality Control and Inspection Services
Denim Garments Quality Control and Inspection ServicesDenim Garments Quality Control and Inspection Services
Denim Garments Quality Control and Inspection Services
Asia Quality Control
 

Viewers also liked (11)

Final Dissertation
Final DissertationFinal Dissertation
Final Dissertation
 
อุปกรณ์เชื่อมต่อคอมพิวเตอร์
อุปกรณ์เชื่อมต่อคอมพิวเตอร์อุปกรณ์เชื่อมต่อคอมพิวเตอร์
อุปกรณ์เชื่อมต่อคอมพิวเตอร์
 
Image Slide ( Animal Companion in Maze )
Image Slide ( Animal Companion in Maze )Image Slide ( Animal Companion in Maze )
Image Slide ( Animal Companion in Maze )
 
Push notifications with dashboard and swift
Push notifications with dashboard and swiftPush notifications with dashboard and swift
Push notifications with dashboard and swift
 
Estructura naomi hara
Estructura naomi haraEstructura naomi hara
Estructura naomi hara
 
อุปกรณ์เชื่อมต่อคอมพิวเตอร์
อุปกรณ์เชื่อมต่อคอมพิวเตอร์อุปกรณ์เชื่อมต่อคอมพิวเตอร์
อุปกรณ์เชื่อมต่อคอมพิวเตอร์
 
อุปกรณ์เชื่อมต่อคอมพิวเตอร์
อุปกรณ์เชื่อมต่อคอมพิวเตอร์อุปกรณ์เชื่อมต่อคอมพิวเตอร์
อุปกรณ์เชื่อมต่อคอมพิวเตอร์
 
CV-C.Mouli
CV-C.MouliCV-C.Mouli
CV-C.Mouli
 
イメージ
イメージイメージ
イメージ
 
Gecko Labs - Our Student Engagement Solutions
Gecko Labs - Our Student Engagement SolutionsGecko Labs - Our Student Engagement Solutions
Gecko Labs - Our Student Engagement Solutions
 
Denim Garments Quality Control and Inspection Services
Denim Garments Quality Control and Inspection ServicesDenim Garments Quality Control and Inspection Services
Denim Garments Quality Control and Inspection Services
 

Similar to How to build a Pokemon Go App

[React-Native Tutorial] Map
[React-Native Tutorial] Map[React-Native Tutorial] Map
[React-Native Tutorial] Map
Kobkrit Viriyayudhakorn
 
Unity3d scripting tutorial
Unity3d scripting tutorialUnity3d scripting tutorial
Unity3d scripting tutorial
hungnttg
 
Monogame and xna
Monogame and xnaMonogame and xna
Monogame and xna
Lee Stott
 
GIS - google earth -placemark - image overlay - screen overlay
GIS - google earth -placemark - image overlay - screen overlay GIS - google earth -placemark - image overlay - screen overlay
GIS - google earth -placemark - image overlay - screen overlay
anjali s
 
Map
MapMap
Processing 2.0 + Open Data
Processing 2.0 + Open DataProcessing 2.0 + Open Data
Processing 2.0 + Open Data
Steven Battle
 
Scene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game EnginesScene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game Engines
Bryan Duggan
 
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
noorcon
 
XNA in a Day
XNA in a DayXNA in a Day
XNA in a Day
Andrew Parsons
 
Geolocation and Mapping
Geolocation and MappingGeolocation and Mapping
Geolocation and Mapping
Ivano Malavolta
 
mDevcon tour 2014 beyondar
mDevcon tour 2014 beyondarmDevcon tour 2014 beyondar
mDevcon tour 2014 beyondar
Joan Puig Sanz
 
Thesis presentation
Thesis presentationThesis presentation
Thesis presentationWataruSanuki
 
Application of Google Earth Engine in Open NAPs
Application of Google Earth Engine in Open NAPsApplication of Google Earth Engine in Open NAPs
Application of Google Earth Engine in Open NAPs
NAP Events
 
Geoprocessing.pptx
Geoprocessing.pptxGeoprocessing.pptx
Geoprocessing.pptx
DemharunYoungMan
 
Polybot Onboarding Process
Polybot Onboarding ProcessPolybot Onboarding Process
Polybot Onboarding ProcessNina Park
 
Geogebra for physics
Geogebra for physicsGeogebra for physics
Geogebra for physics
Lenore Horner
 
Data Scenarios 2020: 6 Amazing Transformations
Data Scenarios 2020: 6 Amazing TransformationsData Scenarios 2020: 6 Amazing Transformations
Data Scenarios 2020: 6 Amazing Transformations
Safe Software
 
Geopaparazzi workshop on FOSS4G2015 Seoul
Geopaparazzi workshop on FOSS4G2015 SeoulGeopaparazzi workshop on FOSS4G2015 Seoul
Geopaparazzi workshop on FOSS4G2015 Seoul
Hirofumi Hayashi
 

Similar to How to build a Pokemon Go App (20)

[React-Native Tutorial] Map
[React-Native Tutorial] Map[React-Native Tutorial] Map
[React-Native Tutorial] Map
 
Unity3d scripting tutorial
Unity3d scripting tutorialUnity3d scripting tutorial
Unity3d scripting tutorial
 
Robotics Portfolio
Robotics PortfolioRobotics Portfolio
Robotics Portfolio
 
Monogame and xna
Monogame and xnaMonogame and xna
Monogame and xna
 
GIS - google earth -placemark - image overlay - screen overlay
GIS - google earth -placemark - image overlay - screen overlay GIS - google earth -placemark - image overlay - screen overlay
GIS - google earth -placemark - image overlay - screen overlay
 
Map
MapMap
Map
 
Processing 2.0 + Open Data
Processing 2.0 + Open DataProcessing 2.0 + Open Data
Processing 2.0 + Open Data
 
Scene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game EnginesScene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game Engines
 
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
 
XNA in a Day
XNA in a DayXNA in a Day
XNA in a Day
 
Geolocation and Mapping
Geolocation and MappingGeolocation and Mapping
Geolocation and Mapping
 
mDevcon tour 2014 beyondar
mDevcon tour 2014 beyondarmDevcon tour 2014 beyondar
mDevcon tour 2014 beyondar
 
Thesis presentation
Thesis presentationThesis presentation
Thesis presentation
 
Lab 1 1-1
Lab 1 1-1Lab 1 1-1
Lab 1 1-1
 
Application of Google Earth Engine in Open NAPs
Application of Google Earth Engine in Open NAPsApplication of Google Earth Engine in Open NAPs
Application of Google Earth Engine in Open NAPs
 
Geoprocessing.pptx
Geoprocessing.pptxGeoprocessing.pptx
Geoprocessing.pptx
 
Polybot Onboarding Process
Polybot Onboarding ProcessPolybot Onboarding Process
Polybot Onboarding Process
 
Geogebra for physics
Geogebra for physicsGeogebra for physics
Geogebra for physics
 
Data Scenarios 2020: 6 Amazing Transformations
Data Scenarios 2020: 6 Amazing TransformationsData Scenarios 2020: 6 Amazing Transformations
Data Scenarios 2020: 6 Amazing Transformations
 
Geopaparazzi workshop on FOSS4G2015 Seoul
Geopaparazzi workshop on FOSS4G2015 SeoulGeopaparazzi workshop on FOSS4G2015 Seoul
Geopaparazzi workshop on FOSS4G2015 Seoul
 

Recently uploaded

By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 

Recently uploaded (20)

By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 

How to build a Pokemon Go App

  • 1. back4app.com How to build a Pokemon Go App
  • 2. How to Build a Pokemon Go App • Back4app provides Parse server service to take care of your backend and APIs development. • Parse also provides basic application activity APIs like Login-in, push notification, payment…etc. • For this demonstration, we can use Parse Geo Point Service and back4app as our backend to build a simple Pokémon-Go. • You can read the original publication on: http://docs.back4app.com/docs/new-parse-app/how-to-build-a-pokemon-go- app/
  • 3. Part 1: Setting up Back4app Parse on your Unity3d • Go to https://parse.com/docs/downloads • Download Unity Blank Project (v1.7.0) • Download https://drive.google.com/file/d/0B7k7pGQXUypGTWRqS1BqVDB WQUU/view?usp=sharing for updated Parse SDK for Unity3d
  • 4. Part 1: Setting up Back4app Parse on your Unity3d • Open Unity3d Parse Blank Project -> Click Upgrade if required. • Replace Asset/Parse/Parse.Unity.dll to the latest one. • Go to Asset/Scene
  • 5. Part 1: Setting up Back4app Parse on your Unity3d • The Parse Initializer GameObject will miss some scripts. • Add ParseInitializeBehaviour to it.
  • 6. Part 1: Setting up Back4app Parse on your Unity3d • Type your Application ID, dotNet Key, serverUrl to a parameter from your Back4app dashboard.
  • 7. Part 1: Setting up Back4app Parse on your Unity3d • Create a GameObject and add script component to the Scene for testing.
  • 8. Part 1: Setting up Back4app Parse on your Unity3d • Add following code to TestParse.cs
  • 9. Part 1: Setting up Back4app Parse on your Unity3d • using UnityEngine; • using System.Collections; • using Parse; • using System.Threading.Tasks; • public class TestParse : MonoBehavio ur { • // Use this for initialization • void Start () { • ParseObject testObj = new ParseObje ct("TestObject"); • testObj["a"] = "HI"; • testObj["b"] = "Back4app"; • Task saveTask = testObj.SaveAsync(); • } • // Update is called once per frame • void Update () { • } • }
  • 10. Part 1: Setting up Back4app Parse on your Unity3d • Press Play Button on your Unity3d Editor • Go to Back4app database dashboard to check the success or not.
  • 11. Part 1: Setting up Back4app Parse on your Unity3d • It is connected with your back4app account successfully if you find your uploaded data in the database.
  • 12. Part 2: Integrate Google Map to your Unity3d Project • To generate the terrain like Pokémon-Go, we need to integrate Google map your Unity3d Project. • First, create Plane and Name it as “Map”, create directional light.
  • 13. Part 2: Integrate Google Map to your Unity3d Project • Second, Create a script “GoogleMap” and add to Map Game object.
  • 14. Part 2: Integrate Google Map to your Unity3d Project • Second, Create a script “GoogleMap” and add to Map Game object. • You can see the original script on: http://docs.back4app.com/docs/new- parse-app/how-to-build-a-pokemon- go-app/
  • 15. Part 2: Integrate Google Map to your Unity3d Project • Untick the AutoLocateCenter.
  • 16. Part 2: Integrate Google Map to your Unity3d Project • Type some dummy parameter to try the Google Map.
  • 17. Part 2: Integrate Google Map to your Unity3d Project • If the plane shows the correct location as your parameter, the Google map is successfully integrated. • You can use Refresh method to refresh the Google map to change location.
  • 18. Part 3: Integrate Character and Interacting with GPS Data • Create LocationManager Gameobject and add the following code. • This code is getting the GPS Data and updating the Google Map when GPS data is changed. • You can see the full code on: http://docs.back4app.com/docs/new- parse-app/how-to-build-a-pokemon- go-app/
  • 19. Part 3: Integrate Character and Interacting with GPS Data • Let test the Google map again. • It is successful if the Google map change when you change the GPS Data in Runtime.
  • 20. Part 3: Integrate Character and Interacting with GPS Data
  • 21. Part 3: Integrate Character and Interacting with GPS Data • After that, create a Capsule as a character and a Cube as Direction of the character on top of the Google Map. • (For me, I place the character at X:0 Y:0.07 Z:0) • Add a compass to your character when you test with your mobile device.
  • 22. Part 3: Integrate Character and Interacting with GPS Data • Make sure your character is located correctly by checking Latitude and Longitude on Google Map.
  • 23. Part 4: Generating Monsters on Map (Part A) • For Generating Monsters, we need to do some calculation on placing the monster with their longitude and latitude location. • Because the ratio between Google map, reality and Unity3d XYZ-world is different. • To figure out how to calculate the relationship between them, we need dummy data. • For more detail : how to calculate. http://www.movable-type.co.uk/scripts/latlong.html
  • 24. Part 4: Generating Monsters on Map (Part A) • First of all, we need to set initial latitude and longitude on Google Map first (You can choose where you want) and set the Markers on the Google Map.
  • 25. Part 4: Generating Monsters on Map (Part A) • Press Run, You will find the label on your Google map. • PS: The reason why we cannot use the marker to be a monster because it is combined with the texture. • The marker itself is a part of the texture but not a Gmeobject so we cannot do any implementation on that.
  • 26. Part 4: Generating Monsters on Map (Part A) • Beside that, we will make some dummy GPS data of monster on Parse server, later on, so we need to know the corresponding ratio on the monster game object position.
  • 27. Part 4: Generating Monsters on Map (Part A) • After that, we create a cube and place on top of the label. • Record this position.
  • 28. Part 4: Generating Monsters on Map (Part A) • Now, we need to find the exact distance between the player GPS location and the marker GPS location. • The distance between start (37.38373, -122.0133) and marker (37.384782,- 122.012893) can be calculated by this script.
  • 29. Part 4: Generating Monsters on Map (Part A) • And then calculate the XYZ world distance between the CUBE maker and the Player Capsule. (-0.563,0.07,-1.915) and (0,0.07,0). • This is a simple calculation, so I don’t list how to do it. • After that, the ratio will be found by this equation • Ratio = XYZ world distance / Exact Distance.
  • 30. Part 4: Generating Monsters on Map (Part A) • Once we have this ratio, we able to calculate how far the monster should be placed according to the Player location. • However, the possible location still undefined because we don’t have the bearing between the player and monster. • To calculate the bearing. • We can use this code. (You can see the full code on: http://docs.back4app.com/docs/new-parse-app/how-to-build-a-pokemon- go-app/)
  • 31. Part 4: Generating Monsters on Map (Part A) • After we get the ratio and bearing, it is possible to convert Longitude Latitude location to be XYZ-world coordination, which means we can place any monsters with latitude longitude location to correct game world location. • With the above code, we know the correct XYZ coordination to spawn monster.
  • 32. Part 5: Generating Monsters on Map (Part B) • While we are able to convert Longitude and Latitude data to the game world, it is time now to create some dummy monster data on Back4app parse server. • Go to your Parse back4app dashboard and create a class call Monster.
  • 33. Part 5: Generating Monsters on Map (Part B) • Add a column: Location with data type Geopoint.
  • 34. Part 5: Generating Monsters on Map (Part B) • Insert some monster dummy row that around you.
  • 35. Part 5: Generating Monsters on Map (Part B) • The dummy monsters are set, they are waiting for you to call. • Then I create a MonsterSpawn GameObject with script Spawn. • Drop the LocationManager GameObject to it (For getting updated GPS Data) • M prefab monster for spawning a monster.
  • 36. Part 5: Generating Monsters on Map (Part B)
  • 37. Part 5: Generating Monsters on Map (Part B) • It is time to fetch the dummy monster data from back4app to your program.
  • 38. Part 5: Generating Monsters on Map (Part B) • The above code gets the result one by one and converting the GeoPoint data to be XYZ-world coordination, and then push the result to the List. • After adding the result is fetched, spawn becomes true to allow program spawns the monster. • You can see the full code on: http://docs.back4app.com/docs/new- parse-app/how-to-build-a-pokemon-go- app/
  • 39. Part 5: Generating Monsters on Map (Part B) • After the Monsters are spawned, the monsters will keep updating when the player GPS data has updated. • Testing. The monster is spawn at correct XYZ coordination with their Latitude Longitude data.
  • 40. Part 6: How to move the Player (solve google map texture slow problem!) • Until Part 5, the movement of the player is relied on the Google Map texture updating. However, it is not effective to play it. • The user experience is not good. • To solve this problem, we “unlock” the player. • Make player move on the map.
  • 41. Part 6: How to move the Player (solve google map texture slow problem!) • The algorithm behind is similar to updating the monster. • We apply on the capsule. compare the last GPS data and new GPS data to calculate how should the player move in the Game world. • As we are updating the position of the player, therefore we don’t need monster update and google map refresh function anymore. • What you need to do : Modify LocationMaganger.cs
  • 42. Part 6: How to move the Player (solve google map texture slow problem!)
  • 43. Part 6: How to move the Player (solve google map texture slow problem!) • You can see the full code on: http://docs.back4app.com/docs/new- parse-app/how-to-build-a-pokemon- go-app/
  • 44. Part 6: How to move the Player (solve google map texture slow problem!) • Second, attach following code to you camera make your cam follow you character ( Don’t forget to drag your capsule to inspector.
  • 45. Part 6: How to move the Player (solve google map texture slow problem!) • To view source code and whole project -> Raw Unity Project • Issues, comments or suggestions? Let’s discuss in our Developers Group Topic.

Editor's Notes

  1. Davi
  2. Alysson
  3. Alysson
  4. Alysson
  5. Alysson
  6. Alysson
  7. Alysson
  8. Alysson
  9. Alysson
  10. Alysson
  11. Alysson
  12. Alysson
  13. Alysson
  14. Alysson
  15. Alysson
  16. Alysson
  17. Alysson
  18. Alysson
  19. Alysson
  20. Alysson
  21. Alysson
  22. Alysson
  23. Alysson
  24. Alysson
  25. Alysson
  26. Alysson
  27. Alysson
  28. Alysson
  29. Alysson
  30. Alysson
  31. Alysson
  32. Alysson
  33. Alysson
  34. Alysson
  35. Alysson
  36. Alysson
  37. Alysson
  38. Alysson
  39. Alysson
  40. Alysson
  41. Alysson
  42. Alysson
  43. Alysson
  44. Alysson
  45. Alysson