Build Location Based Augmented Reality Apps with Mapbox | Sebastian Armand | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Build Location Based Augmented Reality Apps with Mapbox

teacher avatar Sebastian Armand

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

25 Lessons (2h 30m)
    • 1. Intro

    • 2. Introduction to Mapbox

    • 3. Location Based Scene

    • 4. City Simulator

    • 5. Zoomable & Globe

    • 6. Minecraft - Location Based

    • 7. Setting up the Canvas

    • 8. Import of our Pokemons

    • 9. Pikachu - Quick Attack

    • 10. Gamecontroller

    • 11. Charizard - Fly Attack

    • 12. Logic - Select Option Buttons

    • 13. Pikachu - Thundershock

    • 14. Charizard - Flamethrower

    • 15. Healthbar for Charizard

    • 16. Healthbar for Pikachu

    • 17. Logic - if Pokemon is dead

    • 18. Black Screen Effect

    • 19. Spawn Pikachu

    • 20. Catch Enemy

    • 21. Adding Sounds

    • 22. The ARInterface

    • 23. Buildings for our Map

    • 24. Spawning the Pokemons

    • 25. Trainer Animation

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

Build your own Augmented Reality Pokemon-Go Clone! 

  • Create a GPS-based Pokemon GO Clone (with Mapbox)
  • We will use the ARInterface that combines ARKit and ARCore in one Scene 
  • All Apps are running on IOS & on Android 
  • Learning by Doing, we will code all from scratch

Why should you learn Augmented Reality & Mapbox?

  • Mapbox handels the mapping, so you’re free to focus on designing, building, and developing your application.
  • Augmented Reality is in it's early stages
  • There is still much potential to create awesome Applications.  
  • The demand for Augmented Reality apps is bigger than ever before   
  • Break into a brand new industry expected to be worth $165 billion by 2024

This course is about creating a complete Pokemon GO - Clone from scratch! In order to create a Pokemon-GO Clone, we gonna have a look at numerous basics of the Gameengine Unity3D and the programming language C#.
For the GPS-based Part we will use Mapbox. Mapbox is an excellent tool in order to effectively create GPS-based Maps and accessing to datas of the real world.

Meet Your Teacher

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Intro: Hi, everybody. And welcome to this video. This course is about GPS based maps and augmented reality. It's may never people great. The Pokemon go clo like in Pokemon go. We can walk in the rear growth If you're close enough to a Pokemon, people start to fight for the fight scene. People used our records and our we have more. That means this game is running on IOS and on inference, three game travels pretty much everything you need for game development, for example, animations, particular fix broken if unity shop and much more. We can also catch the poker one. In order to get the real world meditators for what game people used Met books, Met Box is really nice to work across. It provides us a lot of stuff we can work with. For example, a citizen later, which we will use for a war game as well worth the city's emulator way can generate buildings on the map. The buildings are based on the data off the real road. That means the buildings are right on the same place, like a real met box. We have access to real real club and some able and another really cool. Future is micro seem also based on real roads. Data's Met Box writes my growth location based game. So if you are interested in creating augmented reality GPS based maps, maybe have no idea where to start, then discourse could maybe something for you. 2. Introduction to Mapbox: So let's start for downloading the main STK we need for the scores. As you can see here in the background, we will rock with Met box ready met boxes Really nice tool because it provides us a lot off MEPs We can customize what exactly from upstairs provides. We will see later. So far no important is toe pricing. As you can see for our development, it's for free only if you use this for commercial purposes it will cost money and also important is the documentation. As you can see, Met Box is working on several platforms for android IOS and off course Important for us for unity I would say Let's get started, Click on maps STK Unit to you and on Signed in If you haven't already an account here then please first register run here and signed in No, let's click Met box and get started shoes Unity And don't load this picket Opened unity and create a new project I will name this Met box Pokemon and this will be a three d scene parade project Make a double click on the unity package in order to import mailbox into unity click import and No, this window should pop up here. We need to copy. It is a token from MIT Books. You can find the Totenberg when you click next and this token you need toe co P tasters and click submit. As you can see, we have several example teens in the next videos, people talk about them and people start with location based game. 3. Location Based Scene: So no, let's have a look at the location based game, in my opinion, is the most important scene off this project, because in this scene we have all the important prefects we have tow rope of. I want to show you them. Therefore, let's click play. So first off all this the default look off the map and all the logic that is responsible for that you can find under the game object location based game. So be if you're a war player. The position and the rotation off the player is set up by this two scripts. The immediate position off location parade a script and sets the player to the longitude and latitude from the world. You can see the current longitude and latitude, by the way, here on the canvas, we get this radios from the location per writer game object, especially from the device location provider and the editor location provider. The editor location provider is for testing the location based game in our Unity Eddie tour . And as you can see, these are the default values I'm rich are set here on the canvas, for example, let's change the values you can see the player is immediately changing, depending on the latitude and longitude and the same functionality we have here for our device. Well, if we run the scene on a warm over device, then we will fetch the longitude and latitude breath descript and accordingly. People also said to player to this position. Next, we a few award myth the auto initialized MEP, depending on the values from the location provider. So from the longitude and latitude and another really nice tool, it's the abstract Memphis script. Of course, here we have a lot off perimeters and we can customize, for example, for zooming. Or we can change the default image off the map. For example, let's shoes meh poke stock. You can just, for example, your own customized to rain for the map and also really nice. Future is Victor. We can adhere, for example, buildings based on the data from the real world, which we get from met box holders will look like, and we will see in the next video across Met box and provides complete scene for that. So that's basically the important parts here. So summarized. Important to understand is that we are searching the longitude and latitude data from the location provider. Eyes are from the device. So the GPS data us from the real world or for testing the Mafia and the digital. And based on these data us and we set up the map was a position off. So playoff. So the nice thing is that all this difficult stuff has already bean done for us and therefore, in order to create or Pokemon go clone, we only need to customize this scene here. And it last I would recommend toe test a scene on your device in order to shake if everything is working correctly. Therefore you can goto fire it settings, then truth your platform android or IOS, and at the scene to the bit and then click on playoff sittings. Hey, let's type our company name and product name, Sell out the bundle, identify arm and also really important. Make sure that you have a string on the location Huge description and under camera usage description And for android for Lord Za pic, coach name And finally make your build and run another thing. If you get an error message like location services not enabled, then you need to go under the settings off your device and you must give your permission. Toe the location. Services a czar rise. This will not work. That's everything for this video. And in the next video, people freeze on city buildings. 4. City Simulator: another important Seen this city's simulator. You can find us under met box examples, prefab scenes and then cities the more later. So basically it assessed the same components, like the location scene, but also player, Let's click play in orderto shake What we get you. As you can see, we get years three D buildings and based on the data us from the real world, and these buildings are generated or medically on every single location. For example, let's change the location toe New York So the logic for debt is under the strict EP script under Victor. If you want to change, for example, the color or the size, you can do this year for the buildings and the roads. We will also use this future for while Pokemon go clone. And therefore you will see this later on what we can customize year everything for No, it's only important to understand what everything exist here in the project. Andre, you can find us. Therefore, that's everything for this short video. And in the next video, we're gonna have a look at soon able map in the Globe 5. Zoomable & Globe: No. Let's have a quick look at the soon able map. You can find us under that box. Examples. Assume able. Let's click. Play here isn't natural, say, because this is basically like Google us, so we can search and zoom here to every single location in the rearward. You would like toa. So if you want to create, for example, location based Epper, if really high quality and satellite imagery, then you should stop. Maybe both this scene. And in addition to that, I want to talk about the club scene. Let's open the club scene. The Examples Globe Club scene and this scene. Mitt Books provides a club also based on the data us from the real good. That means you can also interact here with the longitude and latitude off the club. You can see this year very well with the custom. Marcus, For example, if you want to spawn something on an exact point on the globe, then you can do this year riffs us born on club example. So here you can at new location. Under this area, you can change this custom, aka prefab, and you can also skaters, and this is actually everything for this Tour de machines, and in the next video, we'll have a look at Minecraft in location based example. 6. Minecraft - Location Based: No. We will talk about the Minecraft location based scene. You can find us under the fox a map photo. So let's open the folks and map the idea off the scene. I'm really nice because Met Box uses years a color off the real road data and send a transformed this in such folks. It's for example, if the satellite emerge. Arria has blue areas, then met box and transforms this into water foxes. I can show you this. Let's go to the folks tire. So the folks, the type of script is responsible for the logic. For example, here we can change the zoom. Let's decrease this, for example, Toe and no, you can see here. The whole continent in Fox is based on the satellite, imaginary and under the fox. A tight script. You have a lot off perimeters you can customize. For example, you can change the death and the height off the location, and you can also search your every single location off the world. And these are the important parts off this example scene and in the next video of people, start with Pokemon Go clone 7. Setting up the Canvas: no rebel creates a Pokemon go clone. We have a lot off stuff to do here. Therefore, let's get started. Create a new photo game s. It's I applauded you a folder, images and fund. Please don't notice folder and importance in our project on the game s. It's the truth, All images and let's transform them and tool sprites. So click on textual type, Spry toady and you I No, let's create in your seen by clicking on fire. Safe scene. I named this fight scene. No, let's create a new canvas, right? Like you. I canvas the canvas is a layer on our game view and on the game view, we want toe display. No, some takes. Let's stop with the Sharp Resort on text changed of this insight and truth, a new fund, The Pokemon picture phoned. I uploaded you in the folder images and formed. Therefore, you should be able tow. Select the snow. Let's change the front size and place to take on the top lift by hitting old and clicking this window. And then there's polka born enemy name that's create another text. Pokemon enemy level changed informants and dis ice. So this in the height and position. The text also knew. No, let's create a new image, right? Like you. I image this would be use a bath was a Pokemon. The change to emerge with the bar and that changed the rotation, changed the Y value to 180 changed of it's in the height on places. Also knew great that not all text hp changing the forint and the size No, we need more images. Let's name this HP bar Any me choose the bar HP and changed this into height. No click on asserts import pickers. Of course, we need some Sprite images from Unity go under cross platform input and Troussier only old Sprite and very I hear that's also important. Pick urge particle systems across. We will also need this later and moved The standard Assets folder under game Is it grates A bit wrong. Emerge for the age people and let's shoes here as image. The slider handled Sprite customized service and the height and no sh with under image type filled because the fill amount value we were set later toe the health that changed a background color to green and let's customize everything a bit that changed the color off the text to Blake. Another important thing. Go to free aspect and truth years viz in the Hide Off Your mobile device because people let us know as reference. Go under the canvas toe the canvas scale of script because we want to scare our images. Briefed the screen size position. Toe each people are you and let's create an empty game Object Pokemon Enemy you are and Rick and drop all the components under this new game. Object. No weekend crates in football was the text bar a source image changed of his in the height and under the info bar. We need a new text in full text. That's right. Something changed the front and this ice places in the middle and make the split I sing. This looks good. No, let's continue with Pokemon trainer. She was He has a box and skated of size. Let's create a new button so later. If he click, this button is then Beaver spawned our pick. A true delete text. No, we need the cash. Much place this left and no disabled the football and duplicate each people from the enemy. Let's renames the H people from the enemy at your enemy. No position toe h people on the booking Right now we need also the name and the ever It's numbers bicultural on Level 89 for example, Credit an empty game object name does my Pokemon and trick and drop the components under my Pokemon. And finally, we need all the buttons under the Info bar. Let's start roof, creating a new Emerge Select Options shoes. He also the text pop customized to size and position. Here, we need new buttons. It started off the fight button. Customized service, The Heist and position Name this Fight Replicators item. Oh, come on and run. No position All the buttons. Select all the buttons and let's this able image That's great New game, object and trick and drop the buttons under fight buttons. Copy all the buttons and let's create the fight buttons. Sunday. Stroke growing a group. Let's create a new anti game object. Let's also name those fight buttons and let's rename the other again object toe stop buttons, for example, and it lost. Let's create the item buttons copy and paste the button. Let's Nando's, for example. Polka boy Griffin empty game object items. There should be everything for the canvas and in the next video of evil import our cook months into the scene. 8. Import of our Pokemons: so no evil import or polka months into the game. The link off the page I edit you toe the video. You can don't not every single Pokemon you want my peace. Make sure that you shake the copy rights if you want to publish an app after Pokemons because I only want to show you in this course so we can breakfast them. Otherwise I uploaded you. Fold our poker months if you want. You can import this photo, and I also applauded you for the animations piece. Also don't know this photo and importance under Game s, it's No let's great an empty game object. Let's call this my poke amount and go into the Pokemons folder on the pickup. True, and drop the bicultural prefect into the scene. Let's change the size toe 0.5. Reset the position and let's set a bicultural toe. New position. Great. Another game object Any me? Pull. Come on, go under. Sure is that, and trekking for up The prefect under enemy Pokemon also changed a scale. Let's change your position off the polka months in order that they are facing each other and let's create a new plane changed the scale into position. Change the color off the plane by creating a new material strange to color under libido. And at this material, let's enable the select options and fight buttons. Create a new folder, any mater control us and let's create the controllers for Pick a True and Shahrizat. The animator controller will be responsible for the intimations off the Fogleman's. For example, let's open the animator off Peak Country and let's that year, all the animations from the Bicultural Animations folder. So first we cut through Ida. This will be our default animation. Let's start the scene. And as you can see, this animation will be played by default. I created all these animations. I want to show you them, for example, by going into the animation window. No, you can choose an animation, and then you can click play. And if you want to optimize an animation than you can do this year, then you only need toe at a new property and new key frame. No, let's do the same for Shahrizat. Let's go, Andy, any metal controller from Shahrizat and it all these animations. Let's have a look on them. First, click the shore resort, game, object and go into the animation swindle the same here. If you want to change animations, then you can do this in this window. That's everything for this video. And in the next one, we will create our first takes. 9. Pikachu - Quick Attack: first, let's get our Pokemon physics in order that taken interact with each other. Let's go to pick a true and at a new script, the Cultural Contra script and let's it hear rigid body. You disable the career ity. We don't need this and at a new box collider, Click Edit Collider and customized us at. Not a script, a cultural collision script for more structure. And let's create a new photo scripts the folder Fight scene and to fold US Shar Result and pickup truck. Moved to scripts and create the same scripts for Charlie that Sharis are controlled. Script and collisions Script Drake interrupt them to was a pre pheap at the Box collider Interpreter Body. This able Karev ity from the rigid body and customize the box collider. No, let's begin with Our first crypt opened the bicultural control script First. If you find a game object of to take Charlie's art Geo, we need to create the take for sure result. Click on Charlie's Hot Take, Collect the Plus and pacers, and now we set the transform. Don't look at toe the position off sharply. That and the Y value off the oil angles. I don't want to change. Let's have a look on what that will do. Click play. Let's change, for example, the position off sharply thought. As you can see, bicultural looks continuously toe the direction off. Sharp result. This is exactly what we need. Therefore, let's create no a new message tickle. So if you click the enroll button, then we will execute this method first. We want to play the animation take, and we want to set bullion. Pickup truck move toe. True, let's create the bullion across. If we catch, Remove is too. Then we want to move our pick. A. True in the forward direction, we will set the speed toe three float. Let's rename the message toe Kroll. I think this is a better name for the message. No, let's go to the Kroll button. Click on the plus from the button script. Search the game object that holds the script off the roll message. This is under seen the cultural shoes. A bicultural control script ends a roll message That means no. If you clicked crawl button, then we will execute the crawl message. Let's test us, and as you can see, this is Brooking. Later We also want to set a text, for example, bicultural used pre critic. Therefore, let's add here a new comment that we don't forget this What we need know is if bicultural has a coalition of Shahrizat, then we want toe setback the position off the cultural and therefore we need no the bicultural collision script. In this script, we recall the on collision Enter message means if bicultural has a collision of a game object, you have to take Sharp Resort collision at this tech to the game object that has the Richard body and the Box Collider. So at the take and truth to take on the coalition we want to do following first, we want toe set a bicultural move pool toe fault because the game object should not move anymore. Then we want to set the position off bicultural to the position off the game object, my poke a month. We want to play the idol animation from bicultural Sharis that should play an animation. We want to play a sound, and we want to decrease the value of off the health bar. So let's start with the first comment. Let's set the move bullion big toe fault. We can do this as following let's say, public static, Bicultural control script instance said Get that means we can easily excess into the script by any other script. We also need to write in The stop message instance equals this set a 1,000,000,000 toe public and safe to script because no, we can simply say catchall control script dot instance. Not Picot remove. He could force. That's everything with this land off court. Reset bullion. Two folds. No, let's set the position back. Toe my Pokemon. First, let's find the position off the game. Object pickup. True. And then let's set us to the position off my poor come one. That's everything for this. No, we need to play the Idol animation. We need to find the game object bicultural, then accessing toe the animator component and play the idea. Animation. No, let's find the game objective of the Take Shahrizat Geo and let's play the animation collision will be cut from Let's computers. That's everything for no, the other to comment. We will do later. Let's test if everything is working. Okay, let's go to the sure result animation. We need your transition back toe Shahrizat Idol. Let's do the same in the Picacho Control on the take from sharply thought 10. Gamecontroller: So in this video we will create the game controller. The game controller will be responsible for the logic that controls, for example, the text year in the Info Bar. Or when Charlie That Shook Make It Takes, for example. So let's start create an empty game object and name this game controller. Go under the scripts folder Fights in and let's create a new folder. General creates the game controller script at this toe. The game controller an open it First. Let's create a new instance off the game controller script because we want to excess to the ray builds and messes off the script from any other script in control. A script instance. I said Get and said the instant toe this. No, we will create a string game status. This is important because if this spring we will know exactly where we are, let's create a new message. Public roid game status in football. So every time we called this message, we want to execute switch with the switch. We want to know the value off the string game status. If game status has no value, then the fault will be executed. Then we will set the info textile text to an empty string. Let's creates a reference to the inflow text Public text in full text and we need the name space for that unity engine. Thought you I the info text us under the info bar. No, let's write down every single status. For example, the case fight has started. So if our string game status has the value fight has started, then we want to set the in. Flu takes toe via Cherries that appeared. If the enemy appeared, then we want toe Say truth, your Pokemon. If the Pokemon is out, then we want to say Go pick a true IFPI culture. Use the crawl it take If we catch you used thunder shock then Picacho use Sandra Shock And no, if the game status during this enemy it takes then sure result should make an ethic as our Sharis that just fly or Sharis Arguelles flamethrower. Evil executes the attacked by random. Therefore, let's create an inter tra random attack and set this toe random branch between zero end to if random take zero. Then Charlie, that should use fly as a rice. If random it takes is one then, Charlize, that and should use the flamethrower. Let's create the case. If Ash used polka boy and if he caught Shahrizat, that's everything for no, I'm here. That's right. This correctly on this is random. No, let's go in the pick. A true control script here we can call knows the game control a script dot game status codes the game status bicultural, you scroll! And it's also execute the game status infobahn message. Or if it testes? No, you can see the Texas working, but we need to disable the select option Spark. Let's do this, said a reference to the select options, and set a select part 2/4. So if Picacho whose crawling, then we also want to set the game status toe enemy attacks because then I shall resort should make kinetic. We also need something riff that we can execute the message. Let's create a new button for that named this confirmed button changed the front on this ice, make this Blake and placed us at the button, right? So every time you click this button, then we want to execute the message game State with Info Bar that's also set a reference to the button. Go to the bicultural collision script because if Picacho has the coalition, the Shore Resort and then we want to set the confirm button to true Let's testes click Role and Picacho use cricket Tick and the confirm button appeals, Sharis argues. Fly your friends role. This is also working. Let's go to the case bicultural, your scroll. And let's also set years the confirm button two folds. So that's everything for no. And in the next video, we will creates a message for fly and flames for wall. 11. Charizard - Fly Attack: so no, we will create the it takes for Shahrizat. Therefore, let's go to the Sharis are controlled script first, let's set up the fold rotation so game object don't find game object riff take You can truly be open. So if he can find bicultural, then we will set Look at two game object thought. Find game object with Take the country Giorgio Transform dot position creates a take for bicultural at Take Copia and Pacers and Truth and you take Let's great the message fly. We also need the bullion fly. Sharis Art equals true great Julian. So no, if he called fly message, then we will set fly Shari that bullion to true. And then we want to move the game object toe victor free thought up with speed off to float . I also want to start a new car protein. Let's name this rate for flight IC. So first, let's read 1.5 float seconds and set bullion backed toe falls. Let's cause you take in the stop message because I want to see what we get. No, okay, that looks good. Let's continue. Let's not Our bullion named this goal sharp result and said this after a 0.5 seconds to True. Then I want to call the animator and I want toe play the fly it tick. This is just one here. And also if gold Sharis that is true, then I want to change the movement off the game object by calling Victor three Thought forward. Rough The Speed five. Let's have a look on that move. The Shahrizat came object a bit big, and let's test a new cold. Sharis up moves up and also makes the take, So this looks good, but no, we need the coat for the coalition. So this is basically the same like in the pic actual collision script. Therefore, let's Kobe, the whole coat Pacers in the Sharis Art Coalition script. And no, let's modify this here. We need to take bicultural collision. We need to set a new instance off. Sharis are control script, public static. Sharis are controlled. Script instance said gift and initialized the instance in the stop mess it. So we want to set a goal. Sharis are bullion back to false. Make sure that this bullion is public. Other Bryce. We can't access to this. Let's set the position vector with the enemy Pokemon Game Object and after the Collision, let's play the Shore Resort Idol animation and let's play the animation take from Charlie Lot for pickup. True, the rest off the court. We will do later. I would say, Let's test us on full action. Therefore, let's go to the game controller script and it's called here the message fly. So we need to say Schori's are controlled script dot instance. Don't fly and change the random range toe one. In order to that, we can call the fly message and the lead to fly message from Stop Miss it Click Play Roll The country was cricket ticked. Okay, Sharis are just try. This looks good. Okay, VF and ever here, let's shake this No era and the concert. Let's shake the cold. Okay, Does this because we haven't created the take? Let's copy. It's a bicultural collision take at the tech. Okay, No, we have another Aero. Let's make a double click on that here. We need to say here, game object or find game object roof Take because we don't want to change the game object. We need to find the take Shahrizat Geo the same we need to do for the next line off court in order to play the animation. Okay, Up to know everything is rocking. 12. Logic - Select Option Buttons: so no evil at more logic for the select option. Bob. Therefore, let's go to the game controller script. First, let's go toe enemy attacks and let's this able. Here's the confirm button. Otherwise, we can call this case during an attack from shock result. And this is something that we don't want. No, let's set up a new case. Let's call this select option placed select option so often and take from Shahrizat. We want to set the info takes to an empty string. They want to set the confirm button to fold the select part we need to enable. And let's go to the select options here. We want toe, disable the fight buttons and enable the stop buttons. Therefore, we need some new reference to this public game. Object five buttons and public game object Stop buttons Set the connection to the script. Said to stop buttons to True and to fight buttons to Fort. Let's shake. Everything is working up to this point. Show results just fly, okay and stop button appears so no, we need to create the logic for envy. Clicked fight. So far did I want to create a new script under the select options. Open the script, and here we can create the message for on Fight if you click the item button. If he clicked the Pokemon button and it last when we clicked the run button, the need to year also references was the stop buttons was the fight buttons and the items, and we need, of course connections. So if you click the fight button, then we want toe set the stop buttons toe fault because we want to enable the fight buttons . And if you click the item button, then we want toe set. Ah, stop buttons to fault because here we want to set the item button toe. True and it last we have. Here's a two buttons, Pokemon and Run, and this message I only write a comment across this message. We want to in discourse. But if you want to extend this project and then you can create your, for example and you your eye Penhall Ray Ukraine store all your poke amount, or if you click the one button, then you can load, for example, the location based seen we will create later. So that's everything for the script. We need toe quality message off course. The script is on the game object, select options, and we want to call the message on fight and by the item button select options. We need to call on item click play and let's test everything cut. You use cricket tick and let's click fight. Okay, that's looks court. And in the next video, we will create sandals shock take. 13. Pikachu - Thundershock: No. Let's Great Sunday shook it. Take opens a bicultural control script, and let's create the message for the public. Freud, Sanders shock. So first, let's set the game status toe bicultural youths under shock. And let's also execute the game status. In football, we need a new car routine. I named the Sunday Ashok, or Protein Great the core routine. So first I want to play the Sunday shock animation ascend its rate 0.5 seconds. It costs, and we want to play a special particle. Um, victory will create in a few seconds. I also want to play a sound effect here and a special lightening effect. And for sure, we thought, I want to place the animation collision with pickup. True. Then, after one second, I want to set the lightning's effect and the particles effect back to fourth. Let's set the position off. Pick. A True backed was a position off the game object My Poker Month, and it last lets neighbors the confirm button go to the game controller script. Let's at Here's a logic for the buttons, said the select are Back to Falls enabled the confirm button instead, game status, toe enemy it takes Go to the Sunday show button and let's call. Here's a message Sandra Shock and let's test us Talk to your son. The shock. Okay, lets go toothy, animate or controller. Okay, we need a transition back towards the idol. Any mission? Next? We need some new amiss. It's for that. Let's go in the store. Type into the search bar. Lightning bolt Lord and important, This one here Very. I hear. Let's also don't load another asset. Please type in year Kim Fire pick Don't load and important this one here and moved to the new assets in the game s It's follow should be cultural and go into the animation window. Truth here The Sunday stroke animation across a disposition and I went toe at the particle effect. We can find this under standard essence article systems pre fabs flail. The only need sparks from here make the sparks is a shied and frumpy cultural and free set position On the top left shoes Another button in orderto that you can move spots Effect moved us upto this point here. No, let's at the lightning bolt. Perfect, I reckon dropped is under our control game object please change the transformed values toe this values. You can also change the color off this prefab. Let's make this yellow. Let's kick play and truth Sunday Stroke animation Once again. And let's also changed the position off the Lightning pre for a bit. Copy the values and make rightly pays component values. No, let's go to the pick a true control script and let's get this two effects toe the script. The Public Particle Systems Box and the public game object Lightning's set up the connections. Go to the Sparks, came Object and this able play on a vague because we want to a neighbor this effect from a law script. So let's right here. Sparks don't play in Neighbor. The Lightning's game object Dot said Active True. And after one second set, if expecto fault okay, lets modify this a bit. First said that very your frumpy cultural 20 moved this a bit forward, moved the Sharis that game object as they under the Lightning Boy script, and we can change the start in the imposition off this effect. For example, let's it that value to I sing 1.6 is a good value. It last duplicated effect and enabled us and changed a position off the new Lightning's 14. Charizard - Flamethrower: No. Let's create the flames forward. Take for sure result. But first, let's fix an arrow. Ren Picacho makes the cricket take, then pick actual place the animation take from Shall We Thought so. Let's fixed us is a problem comes from the script show Result Collision script. He can fix this by adding here the second condition. So only then Shari that has a collision with Pick a True and the Goal Sharpies are bullion is true. Only then we won't execute the following code. This road Retinal catcher use cricket ticked and the animation is gone. No, let's create the flames. Roar Goto Sharis are controlled. Script public would flamethrower. First we want to start a new car protein late for flames. Roar craze The protein Let's access to the any mater and plays a flamethrower. Animation Vaid. One second Here we want to play a particular effect and sound. Then, after a 0.8 seconds, video plays the take from sharp resort animation for pickup. True and after not our second, we want to stop the particular prefab and we need to enable the confirm button. Okay, now let's go to the game controller script. Go to the case. Any meat it takes and change the random branch toe one and two across for no. We only want to execute the flamethrower. Take let's access to the Shar without control script. Not instant. Let's call. Here's the Flames robot message. Let's test us, okay, Changed their position off Charlie's out a bit as you can see the flames for what message is working and copy is transformed values and paste component values go to the sharp. Is that controller We need your transition bank toe Sharis are ill and no opens the head game. Object from shore results. Go to the camp Fire pick Particle and Rick interrupt the torch under the head game object. Reset the position and the rotation and go to the animation window and play the flames roar Animation. We need to change the rotation of it. This able play on a fake change to stop speed and to stop size a bit. Okay, this is good. Therefore, grades the reference toe this particle public particular system flames Rocio crate the connection to the script. So after one second, play this particular effect and then stop it. This should be everything. Let's have a look on that Sunda shock. Sharis are used flames for warm and all animations are played correctly 15. Healthbar for Charizard: So in the next two videos we will create the logic for the health pass. So let's get started. Go to the Sharis are controlled script import the name space unity engine, don't you? I Because we need access to images. We need the float shore resort, health and an image age people. Let's create the message for then Picacho jewels. Cricket Tick. For that, we need to perimeters a cricket. Take value. So how much life should be reduced and bullion collision with Picacho means we only want toe decrease health from sharp result brand P Cottrill has the coalition Bashar With that set up the H people image, we need to find a game object. I'm proof the name HP Bob Big groaned. Any me, Kobe, the name Pacers. And we need the component image. We need to decrease the sharp without health minus cricket. Take value. And if Charlie's that has to coalition of bicultural, only then we want to display the health on the H people. No goto the bicultural control script in order to call the new a message. Sharis are control script dot instant dot cricket take from bicultural lift cricket, take value and fluids from descript great cricket ticked radio. Important here is to make the float on public, said the cricket. Take valuable. For example, Tour 20 and No Goto The bicultural Collision script. We Need the Public Boil Coalition of Bicultural. It's true, and from here we can give the cricket take frumpy country message, the collision of of pick actual bullion, safe all the scripts and let's test us Okay, I'm off course we need to give him surely that default. Health value centers toe 100 a youth cricket ticked, and only when Picacho has the collision with Sharis aren't really decrease. Hey, HP Bar image. No, we need the same for the Sunday broke open. The Sharpies are control. Script creates a message for that Sunday Shock from bicultural For that message we need as parameter on the Sunday shock value. First we need the connection with the image. Then we will decrease the health miners the Sunday value, and we need to display the new health on the canvas Goto Bicultural control script. Create the public float Sundar Shock Value set us for example Tool. So do you and execute the new message. Let's test the two attacks 16. Healthbar for Pikachu: No, we can use the same procedure Grifter HP bars for the country But first we need toe display the h people for pickup True, Let's great under Pokemon train a new empty game object Name this trainer in full disabled this game Object and drink and rob my Pokemon under our Pokemon trainer and neighbors The game object No Go to the pecan True control script we need you know the flight take from Shahrizat Miss it with the two parameters float fly value and the bullion collision of Shahrizat Important name Space Unity engine thought you I they also need years Image age people and the floor p cultural health um centers to 100 We need access to her edge People are image game object would find the name is H Cuba Crone's get component image We need toe decrease P cultural health miners fly value and Sharis artist A collision with bicultural We want to display the new health value on the cannibals open The Sharis are controlled script on Does a fly message called the message fly a take from Shahrizat as perimeter fly value and falls create the public floored fly value Let's set us, for example, Toe 20. And we need to give the flight take from sharpies up message the collision of Shahrizat Julian and therefore go to the script Shahrizat Collision Script. Let's call here the flight take from Sharis up message and let's gift us. Here's a collision of Sharis on bullion braids, a public pool equation of Shahrizat and centers to truth. Go to the game controller script and said the random wrench on big toe zero and run in orderto Shake the Fly It take okay, and finally, we need the flames. Roar from shore resort. Proof the perimeter flames for a while. Value. Kobe. There's two lines of code and only Shane. She has a fly value name. If the float flames roar value. Let's create this and centers, for example, to a Saudi. And maybe let's call this message after one point and five seconds and therefore paste line off court in the raid Flames rock routine. Let's do the same and for Sunday shock safe word scripts. Go back to the game, control a script and said the random ranch toe zero and two. And let's test everything 17. Logic - if Pokemon is dead: in this video, we will create the logic for the case. If one off the Pokemons is death, let's start with P Cultural Goto the bicultural controlled script. If the bicultural health, the smaller or equal zero, then we want to start a new coach in name this rate than it. Great succor routine. First we want to read 2.5 seconds because then we want to set the game status toe. Truth is dead and we want toe execute the game status info bar and it lasts and we want to disable. True. Let's go to the game controller script because we need the case. Pekka True is dead. Under this case, we will set The info takes toe your Pokemon is that it will change the game status, toe load, location, scene and we will enable the controlling button. Let's creates a location seen case for that, we need to import the same management name space. In this case, we only want to load the scene location based game. I write this comment across. A Mabel creates a scene later for no. Let's only called d block. Good luck Message, Lord, New scene and let's do the same for sharp result. So if Charlie's that health a smaller or equal zero, the author want to start a new protein rates and debt rate. Some seconds, Andi said The game status toe any me state execute the game status info bar message and disables. Ah, Charlie thought game object. So let's great the case. Sharp result is that then we want to set takes sharp result is dead. And we also want to set the game status Toe Lord location scene and enabled the confirm button as well. Okay, we have a never here, make a double click on that and right the faults in the parentheses. 18. Black Screen Effect: okay, and this video of evil creates a blank screen effect when the game has started. Therefore, we need a new image for the image shoes, for example, the button space boss Bright said. The risks and the height to the size off your mobile device make the image click and name this black screen under image type. Truth felt because we want this Phil amount affect you. No, we can creates the logic for a blank screen. Great in your script named this Stock game Frank interrupters under the game controller. First, we need, of course, the name space for all images Unity engine Thought you I public image blank screen and the floor amount said the connection from the script with a blank screen and by default, disable the black screen image. So if the senior has started, then immediately we want to start a core routine start fight. So first in the core protein, we want to set the black screen big toe truth, and we want to play a sound effect, which we will create later. We want rate 0.1 2nd Then we will create a for loop, even sent you a temporary into try to zero, and it's long I a smaller than 20. We will increase I plus one in the for loop. We need Rend. Um, El Far flowed, even set up the floor with random that range between 0.0 and 1.0, followed by writing 0.5 segments. Of course. Then we will set the all far off the blank screen image through the Renda Mall far, and I want to show you what this code is exactly doing. After this followed, I want to set it far off the image. Big toe. One the fella moment we need to set to zero because nobody can create, for example, via loop. So as long fill a moment, a smaller or equals one Weaver raid the short time and then we will increase the full amount and plus 0.5 float ended last. We can set the black screen dot fill amount, toe amount. Let's have a look on that. Okay, I think this looks good. Let's rate another time and let's create a second for a loop. So this for loop is only toe display. The black screen thrice and it last we can set the game status toe fight his starters and we need to call, of course, the game status info bar. We've called a new message. Sharp Resort appeared. You have a great this message in a few moments and for nettle, said the black screen. Big toe folds. Okay, I'm Goto. The Sharpies are control script. Let's create years a public Freud sherries at pier message. So if I'm sure he's not appeared, we want to play a sound effect. The sound effect people create later. Therefore, let's writers in a comment. No, let's go to the case. Fight has started. So if the fighting started, only then I want to display his ah, Pokemon enemy you. I Therefore, let's disable this by default. Let's set a connection toe Pokemon enemy You. I am in the game controller script and enable this game object. Under the fight has started Case we need to set the confirm button here to true is very and change the game status Toe enemy appeared and by default also disabled. Select options came object. Let's start the scene. Wild trial results appeared. Okay, shoes, Pokemon And as you can see, this isn't working yet and therefore less great. The logic for dead in the next video 19. Spawn Pikachu: As I already said in the last video, we will create knows logic for suborning pickup. True. So first let's go to the canvas under poca moment right now and this able my Pokemon by default and enabled trainer and ball. I also applaud that you folded up football and animations Please take this one and importers on the game s it. No, let's create new empty game object My items go to the new portable folder and truth applicable you want I will take this one here and then trick interrupters under my items sent to position back to zero and change position off the my items came object toe for example Disposition, Go to game s It's animator control us and create a new animator Control off the portable So named this portable controller Open the controller and Rick and Rob Z animations I created for you in the controller Let's have a look on the gold bicultural animation. Okay? No, we need another script. I named this Go Pokemon break and rub this under my items and to open the script first we need references to be cultural and portable. We need the message Gold bicultural is the message. We need to start a new car routine spawn P cultural By default, we would set the polka ball to falls. Therefore, we need toe unable to poke bowl here. Then I want access to the animator off, supportable across. I want to play the animation Gopi Cultural Zenit rate 1.5 seconds and said the game status to Pokemon result and called message game status in football. And then we can set a pickup game object to truth across by default. Let's also disable pick a. True. Then we need to set the animator off the polka ball to fault and the whole game object to fold, I said to connections to the script and a small mistake. Reckon dropped. Go Pokemon script under my items and no goal under Pokemon trainer and opens a portable button across. If he clicks the polka boy button, we want to call the message Gopi Control. Let's testes shows your pokeman and click the ball as applicable animation. This plates and pick a true this morning. Up to this point, everything is working. But if you click okay. No, you can see we haven't created logic for that yet even do this in a few moments. But for no, let's create a small animation effect for Pick a. True So let's go to the script. Go Pokemon. Let's create your temporary afloat I and centers to zero create the via loop. So as long I smaller or Rekers 0.5 floats, we won't increase my plus 0.5 We want toe rate a short moment, and then we want to set the scale values off bicultural toe I. So if this line off coats, we created this small animation effect. And but let's change your something. Goto the bicultural game object and changed the scale here to 0.5 on by default and it lasts. Let's go to the game controller script. First, let's go to the case of Enemy Appeared and let's set you the game status toe. No. So at this case, if he clicks the confirm button, then we will call the default case. So an empty string. If you have the case, Pokemon is out then first, and we want to play a sound and we need to game objects. They know you are and pull. Come on, you are set the connections to the script across. We need to set the trainer. You I came object to fort the Pokemon You I again object to true enter status and we can set toe select option. 20. Catch Enemy: So in this video we will create a logic in order to catch Shahrizat. And therefore, let's start number of creating a new script. Go under scripts, Fight scene general. Great. See Shop Script. Um, named this Gold Polka Board at this new script. Toe my items, open the script. Okay, First, beneath the new public game Object portable and the new message. Catch any. Me either Execute this message if you click the portable button under items. So first people set the game status toe. Go poke aboard. We need to call the game Status Info Bar is very. Then we can enable the portable game object and we will set a new bullion boy Move troops create the bullion William Boyd move. And then if born move is true, we simply say portable. Don't transform about translate Electra sweet brought forward and speeds, for example for Florida. As you can see, the movement for the polka ball is really simple. We will only move supportable in the forward direction. But if you want to improve this logic, then you can do this off course and let's also riots following. If we can find Charlie, thought Zen, we will said. Look at off supportable toe game object would find game object riff. Take Shahrizat Geo about Transformed What position? No go under select options Items portable and let's call here under my items, catch any me message. Let's test of spawned. Pick a true item and click the polka board. As you can see, the movement is working. Therefore, let's create knows the logic. If the portable has a collision of sharp result for that, let's create a new script. I named this collision roof Shahrizat. Let's go to the poor people first, Let's interior a new box collider Ah, rigid body and at the collision of Cherries that script, Let's call here the on collision Enter message from Unity. If the portable has a collision with the game object, Charlotte's are collision. Then we want this able sharp results. We want to enable the any Mehta from the polka born because we want to place the animation enemy in bowler, you will play a sound effect and starting a new court watching great succor routine ve vill right. Two seconds and then we will set the game status toe sharp result in portable end people enabled the confirm button. A small mistake. Please go to the football game, object and remove the component rigid body. We don't need the rigid body. And for that logic, I know this is not the best logic in order to catch a Pokemon. But it's just to show you a possibility and how you can do this. A ZAY said. You can improve this off course. So next let's set some logic for the game controller script. First, we need a reference to the items. Let's go to the collision of Shahrizat script and renamed the Game State to see You. This is not correct. Two called Sherry that So we want to play here. Sound effect. We want to set the game status toe load, location, scene and let's go back to the gold polka Boy script. Here we will said the items came object to fort and Select Park came object to fold? No, we can test everything. I was born pickup. True. Okay, click the applicable and we can catch Charlie thought. Um but here is a text missing. Let's victors. This is because the name off the case is ash amuse portable and in the go portable, the name is Go portable. Therefore, let's rename this and projectors again. Issues is possible. Okay, Shari Zappos Court and loading on your scene. 21. Adding Sounds: so this will be the last video for the fighting and terrible, great know all the sound effects. So let's start. I uploaded you fold the audio's Please don't load and importance on the game essence. No, we need in your script. Let's name this Solans control at this component and under the game front Roller open it first. Let's great an instance off this class in orderto access to the script here from any other script. So we need public aesthetic sones control. Instance said Get and initialized the instance and no, we will set references toe all audio's Let's copy and Paste a several times clicks on the cultural starts on Shahrizat starts on Take a Look Zone Sunda Shocks owned flames roar, go poke a boy or enemy and polka bore and enemy courts don't. And also let's create a new public message named this Click Sound. And to this message, the only will plays a click sound and no, for every single sound effect we need toe it a new audio source. Let's store us, and we need to disable play on a vague on every single sound effect. So let students for all if you have done this, we can continue. Let's go to the confirm button, go to the button script and click you on the plus across every time we click the confirm button. Then we want to play the sound from the click sound message. And no, let's play all scientifics in all scripts. Let's start with the stop game script. This script. You want to play the fight sound? No, let's go toe sharpies are control script. If Charlie thought appeared, then we want to play the sound effect show. Result start. Let's Kobe is the line off court. Go to the rate for flames for work or protein and let's play. Here's a flamethrower sound. Go to the Sharpies. That collision script she left plays Tickle Son. No, let's do the same for Bicultural and the sand Ashok or routine. We want to play the Sanders Shock sound in the collision script. You want to place the ticket sound, go to the game, control a script. If Shahrizat both court, then we want to play the sound effect enemy cough sound. And if pick a true is out, then we want to play the sound effect. Bicultural starts on and it last. We need to go to the collision of sharply that script under as applicable. Yeah, let's play the sound enemy in polka ball sold. And another thing we need to do is go back to the M control a script across. If he called char result, then let's also stop the fight so into effect. Okay? And this would be everything for the Solans. 22. The ARInterface: in this video, you let the logic for the augmented relative part for that Met box provides. Here's the unity. Our Air Interface folder. Let's go to the folder under examples focussed career sold er air interface is the OS decay from unity that combines are rare court and aria kid and just one scene buys. Ray and I have a complete cross for the our air interface. So if you are interested in tow, have a closer look on that. Then you can check this if you want, but for no, the only need toe copy the our air route. Go back to the fight scene and Pacey, our air route disables main camera because people use nosy R F camera. If you click play. No, you can see here the future points and the planes, but we don't need this to futures and forward game. Therefore, that's disables the Air Point cloud. Visualize off and see our airplane original Isar and disabled billions under the our air controller. Let's change the position off the our air Would came object. Let's such the shuttle plane free for and Rick and dropped the shadow plant grief up into the scene this prefab is responsible for in orderto create shadows in augmented relative Let's Kobe, the values from the plane and paste is under transformed values off the shadow plane prefect on display. Look here from the shadow plane. Prefab doesn't trust the back from the Unity Editor. If you run the scene on your mobile device, then you can see everything correctly and therefore it last. I would say you can play the scene on your mobile device. So go to file boots, settings, true CIA, IOS or Android at the scene and then makes a bit and running way. 23. Buildings for our Map: So in this lecture, even modify Met box location based game scene, we can find the scene under Met box Examples Brief up scenes. Location based game opened the scene. As you can see, the only have Here's a the fourth Met from my box, but for Pokemon go clone and I want to add some buildings. But first, let's go to the location provider toothy. Any tour and the change in the Eddy tour the default location. Toe New York, for example. No, let's get some buildings Goto, MEP and under Victor click Add original Isar and under as a visualize er, we have a lot off default settings. We can customize that change, for example, extrusion type toe property height. We want to customize roof and the site off the buildings under text during type, and we need atlas roof color. No, we can customize the roof off the buildings. So if you want to change the material, you can do this year changed of all toe this default material at last in photo at last in four and the change color off the materials toe urban. This would be everything. Click play, and as you can see based on the data's met box crates of buildings it lasts. Let's also customize the roads at a new original. Isar named this road as primitive type. We need line changed the line roof to, for example, three Change. The extrusion type is the Hyatt two tour and the scary efecto to one and truth material you want for the street. 24. Spawning the Pokemons: No. Let's continue the spawning the Pokemons on the map. But first I uploaded you a folder Trainer please Importance on the game s it's Opens a trainer, Food are and drink and drop the trainer prefab under location based game skater size off the trainer toe. A similar size like the player came. Object The Cross people use trainer came object instead off the player game. Object For the game, Go to the trainer Onda. Change the animation, remove the animator controller and at the animation component, Drink and Drugs, a trainer. Walk animation on animation. So this is the default animation for the trainer? No, let's at the components from the player came object to the trainer game. Object at the immediate position. Both location provider and the rotate both location provider rotation follow Fecteau and through to And no, you can disable the player because we will use no the trainer. Let's add the materials to the trainer. Okay, that's all of material goods. No, let's create logic in orderto sports. Pokemons on the map for that create an empty game object named this location Controller Goto Scripts Great. A new folder off for the location scene and a new script Name this, for example, location controller at this component to the location. Control our game object. First, we need some references to the script. A new area for all the polka months. We want to spawn the game. Object. Random Pokemon, the position off the trainer and the position off the Met and Inter Draw Rendered pork in one and and into Draw Random X. First, let's create a new folder for all the random poke a month. Let's name the folder pre Phipps, and in this folder you can trick in trouble. Pokemons you want for your game, for example. Shah results, and this shall result changed the scale. Let's intra result. The Sharpies are controller in order to play the idol animation and no, you can't reckon, dropped the game objects in the Prefect's photo and lead the game. Objects said the connections to the script was the pre Phipps on a law area train opposition and the Met position. So if we start the scene, we want to call a message. My random Kocaman. We will set the in Detroit when the Pokemon toe random that range between zero and length off the polka months. Area random X two random that range minus 20 and 20 for example. This value will be responsible for the position. Very well. Spawns a random Pokemon evil. Instead creates a Pokemon a za new game object. Random Pokemon Geo. So we will. Instead, he ate a random Kocaman on the position Random X and on the y and that value office a map Griffin Unchanged quotation as game object. So if we start to see no this cold shorts born a Pokemon on a random position, let's testes, as you can see, I'm sure result this morning on the exposition minus two. Let's start seen again and, as you can see, nosy as our shar result this morning on the position minus 15. No, let's create the logic in order to load the fight scene. I think the easiest rate to do this is by creating a new float distance. Ecos distance between the random Pokemon and the trainer game Object. Let's Prentice Reggio in the Consul. As you can see, the value is No. Eight. If the change in Eliza position off Shahrizat, you can see the value a changing depending on the distance between Charlie's art and trainer. So this value is perfect for loading a new scene across. We can simply say no. For example, if the distance, um the smaller or equals five. Then we will load the fighting. Change your position off Charlie's Art and director lock load fight scene. Another thing we need is following. Let's go to the Sharp Resort Prefect and at a new take random Shari that and it this take Let's do the same for the other Shahrizat. Um random Big Shar without, for example, it's a take because we exactly need to know Rich scene. We want to load. So if the distance is smaller or equals five, and if the Rendon Pokemon is Charlie thought only, then we want to load the fight scene. Both seen Manager are dot loads seen fight scene Important. The name space using unity engine dot C management go to build settings and at this open scene, changed a position off both scenes because first we need to be in the location based game scene and exact is logic. You can juice if you want to start a fight against as our Folkman's. For example, starting a fight roof random X show result. I'm sold this one here. Then you can load the scene for that under this statement. Okay, Lets test us the other shore result this morning changed the position and the de barked out lock message is working. Let's start the scene again. Sharis up this morning. And if the trainer is close enough, then we will start the fight scene and for testing. Let's disable the shadow playing pre flop. Get your results. And okay, Lord, in your scene No, we can enable the semen it drop with it. 25. Trainer Animation: so it last. Let's create some logic for the trainer. Walk animation. Go to scripts. Location, scene. Create a new script Walk Trainer at the script Was the trainer came Option. What we need here is following first. We need a reference to the animation in the update message. We will say if transform about his change. That means if the position off the trainer has changed, only then we want to play the walk, Animation said. The connection. Cozy animation and else if their position has not changed, then we want to stop the animation. Craig, also a new car routine, named this, for example, rate because I want to play the animation a tely east for one second. No, we can test us for testing. Let's disable the immediate position. Wolf location. Paride off script across. I want to change the position off the trainer and, as you can see as soon, position has changed through. The animation is playing, and another small thing and we need to modify is following Go to the main camera and Craig and drops them in camera under the train oh, across the camera and should follow the trainer. And this is Brooking