Unite Berlin 2018 - Create a Location Based Game in 20 Minutes

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right so let's get going I'm excited to talk with everybody today about how you can build a location-based game using the matte box Maps SDK for unity my name is Miroslav lyse ik i'm the product manager on the matte box unity team I work with the unity community and developers like you to understand how we can make easy to use tools to bring location into your games and various projects my background is in autonomous vehicle mapping gaming and helping people launch the right types of businesses so how many of you have used matte box before all right things to people so from a high level matte box empowers developers to connect their projects to the real world prior to matte box there are very few and limited tools focused for developers to integrate customizable maps and location data into their projects we provide a series of api's just like you have AP is for payments with stripe AP is for communication with Tullio we provide location AP is for web mobile and other platforms and they generally consists of several location building blocks the first is global highly customizable Maps so if you want to design a very particular type of map for your app or game or you want to integrate your own data or you want to make sure that the map reflects your particular brand you could use our map API s to do that we also have location search api's so if you want to see what's around a particular place in the world or search for a particular place you can leverage our location search api's and the third type of API we have is our navigation API so you can route people from point A to point B using the API and it also includes telemetry data which means that we have people movement patterns including traffic for particular locations in the world that you could leverage for various different purposes in your apps and the need is real and it's growing we've got over a million registered developers using us and over three hundred million monthly active users through our partner apps so we help power things like the snap map Lonely Planet The Weather Channel and in part you're seeing this growth because mapping and location data it isn't just your traditional navigation experience location data is increasingly powerful in a lot of different contexts and that includes unity it's really really exciting and interesting to see what happens when you take those three types of location API s and data and you bring it into unity with our custom maps and data associated with particular locations you instantly get global customizable 3d cities and terrain in the unity so you can start to create much more real levels for your players you can start to simulate real cities with our location data once you bring that in into unity you suddenly have metadata that you can use for procedural generation so not only do you have buildings that are generated immediately within the editor you also have associated metadata for those locations so in this particular little video you're seeing we have Starbucks mapped out relative to buildings and then we're just swapping out the prefab with that Pio eye marker and so that you can start to leverage that for both procedurally generating gameplay gameplay experiences and also things like styling and maybe I want to style my buildings a certain way if it's a certain type of venue and this is all possible with the location metadata that you get from our API and both of those things are also ready for immersive world scaling our experiences because we have those buildings those buildings are actually reflective of the real world buildings and so when you take those buildings out of the unity editor and you blow it up to world scale proportions all of a sudden this virtual model of the word world you have you can overlay it with the real world and so that is extremely powerful for starting to create immersive AR experiences for four people so here you're seeing a navigation a demo that we built out where you have the marker that's placed in a real exact place in the world once you approach it it triggers it you start to overlay information around the world to use however you want so when you bring those things together you can suddenly bring the real world into games and games into the real world and I want to emphasize that last part you can bring your games into the real world so that starts with things like location-based mobile games you use the mapping layer and py data to start to spawn let's say treasure chests in the world you can simulate real worlds and this is relevant for anything from gaming to we see things in the automotive space we see things in architecture engineering you can instantly generate real world swap buildings out do whatever you want and then again you could blow it up to world scale proportions and so this data is relevant for gaming easy to start with our SDK and we'll show you this right now and it's ready to scale so if you're a hobbyist and all of a sudden your game becomes a hit or you're a triple a game studio and you want to release a large-scale game we have the infrastructure to support you given that we support other very large players in the world so this is kind of the the building blocks but let's actually get into building location-based game and see what this looks like in the unity editor so invite abhishek here our tech lead to take you through hi hi I'm Abhishek the party and I'm the technical lead for the unity team at matte box so I have a background in GIS and gaming engine so the unity demon map box is like the perfect place for me and I helped build the tools that you can use to bring all the map box data into your games and applications so let's start right into the unity editor and see how that goes so at map box when we build our SDKs we care a lot about how you as developers are going to use it and how we can make it super easy and and reduce the time to get started building your applications right so we identified some common use cases for us our SDK which you can take advantage of so I want to show you how we provide them to you in in our SDK so we have we identified location-based game is one of the most common use cases City simulators and other and we spoke about AR so here has two different flavors tabletop ER and world-scale AR so with our SDK you get these four starting points which you can use as like starting points for your building your game or we also provide you some prefabs for the same use cases which you can drag and drop into your game into your existing scene so let's get started with the location-based game prefab or the starting point and see what comes right out of the box so here if you look at the scene hierarchy this is very similar to a default unity scene with the addition of our location-based game prefab and what does the location-based game prefab contain it contains three essential components for any location-based game so we have the map component which is how you render the world in your in your game a player target component which is how you place the player in that world and a location provider component which basically fetches say location from a device or if you're mocking it up in the editor then way of getting the GPS location right so let's let's press play and see what you get right out the box so you can see right out of the box you get a map you get a player which is like a default player which is placed at a location which is which is deriving from the location provider right so this is a good starting point I have everything that I need to get started but when you're building a game you want to have the ability to customize it and make it look as your games art or like the look and feel of the game so let's see how you can customize this experience so let's take a deeper look at the map component so the map component comes to the well thought-out UI and we broken it down into multiple sections so you can maneuver to whatever customization you want to make so suppose I don't want the default looking map I want something darker right so I'm going to choose the data source to be a box dark so you can see there are some defaults that we provide with map box right so these are defaults coming straight away from a box but you are not bound to just using those you can create your own custom styles by using the custom options and creating it it with map box to do so you have full freedom there so let me select dark here how about we add some 3d buildings to the map so at map box we have something called tile services with where we provide data in the form of vector tiles so that's basically geometry coming in with some metadata associated with it so for example if I wanted to add buildings with using my box vector vector data you get the geometry of the building and some metadata associated with that building right so the height of the building the what type of building is there is a commercial building or a residential building so I'm going to add one of those data sources again there are some default map box data sources which you can use or if you have some custom data from a city or you have your own points of interest or something like that you can still create custom data sets on top of our data using map box to do again so I'm going to choose my box treat and under features going to add a visualizer let's call it buildings so here I just want to go a little bit into the details so I want to render my buildings as polygons and my data is coming from a layer called buildings right and let's give the building some height and like I spoke about some the metadata associated with them I'm going to use the extrusion type as property height and there is a property called height which comes with the building right so I'm going to use that property so each building is going to get extruded using the metadata contained in the vector data to style those buildings I again have some defaults which you can choose from or you can create a custom style or material which is basically a unity material so one thing to note here is every feature that is created using our map box SDK is a game object right so it's a Unity game object and you can attach scripts or do anything that you would do with a regular Unity object so okay now let's press play and see what changes have been made so right away you can see I have a darker imagery and I have 3d buildings rendered beautifully in our realistic style okay so that's cool but not every time in your game you want to have like realistic looking buildings you want to like make your game have the art aspect that you've thought about it so you want to fully customize it so let's I want to open up a scene which has spent maybe 10 minutes customizing now I'll show you what is possible with our SDK okay so one change you can that you can see right away is I've replaced the default player where the map box astronaut player let's play so you can see I've totally changed the look of the buildings right they they look exactly as I want them to look in my game and I want you to notice the green polygons being rendered so they are actual real-world parts I want to show you something so if I go under my map and features I'm going to select my Park layer so you can see the layer name is called land use so again map box provides you with data and metadata right so I'm using the land used layer and using the metadata to identify where my parks are and render them with green polygons right here I want to show you like I've filtered only parks so that's what I'm doing and again because everything is a Unity game object you can attach scripts to it we call them modifiers in our SDK and I've attached a script called spawn tree modifier so inside of those green polygons that are real-world parks and spawning some prefabs which can represent my trees cool how about so let's say my game encourages my astronaut to go visit some restaurants right and there's an incentive of going to restaurant how would I identify those restaurants in my game and make sure my players go and visit them so again because my boss provides you with a lot of metadata we also provide you a layer called points of interest layer so you can easily spawn things at say restaurants so how would I do that let's let's let's see so I'm going to go under points of interest I'm going to add a layer I'm going to call it food and so you can say I want the prefab location that I'm going to find by map box category and you can see a bunch of categories here right so I'm going to say none and just select food for now and you can see there is a density slider this helps you select how many pre-brief or like how many points of interest do you want like the density you can you can control the density so I'm going to still say it 15 and let's see what happens oh yeah I have to attach game object for it so okay that's my prefab so now you can see hot-air balloons being spawned at actual restaurants in the world this is great now I'm pretty much ready just to start iterating on my game how cool will it be if I could just iterate just in the editor right and I don't have to build this on on my phone and go out for a walk and find something and then again come back iterate so we heard that concern and we give you some tools where you can go out with your phone or just record a GPS log and play it back in the editor so I I did a walk I did a similar walk before coming to unite Berlin so I'm going to use I show you how I'm going to make this astronaut walk on the same path that I walked in San Francisco I'm going to go into my location provider I'm going to change the location provided to something called a location log a location provider and let's see what that has so it says I'm providing it a log file which is me walking in SF and let's play so that's that's that's exactly my path that I walked on so I've walked in in in a park and astronauts walking so this is really helpful when you want iterate in the in the editor okay so your location-based game is pretty much ready to go you can add some game mechanics and build it on a device it's ready to go but let's take it one step further right location-based games are cool how about we take it to world scale er so let's let's do that I'm going to open up a new scene which is basically this scene set up so like like I mentioned earlier we care a lot about how you use our SDK and how we can make it really easy for you to get started and start doing the work that you know best right and not worry about setting up other stuff and all that so let's set up the scene so it's ready for vault scale er so the first thing that I'm going to do is I'm going to turn off my main camera because er is going to take over the camera I'm going to turn off the astronaut because you become the player in in AR and I'm going to drag and drop a prefab that comes with the SDK which has everything set up that you need for AR right so it has the AR root and AR camera it has some debug components and it has something called a synchronization manager so what are we synchronizing here we are synchronizing the real world with the digital world right so in order for world square to work your digital world has to be aligned with the real world so that's what the synchronization manager is doing so let's connect our map which is our virtual world with the real world so I'm going to drag and drop the map component in my synchronization manager this is one more thing that you need to do because when you render the world in in unity you render it at some scale but when you're doing world's Kelly are you need to render the world at the world scale and because it the data that mappers provides is real-world scale data we can use it very easily in world scale here so I'm going to change my scale to world scale and since we're doing this in the editor I'm going to attach something called a camera movement mock-up script which is going to mock-up me walking in the real world like so I'm just going to follow my player and let's see what happens so this is the same location log replaying in world scale AR so the buildings that you see are world scale heights you can see the hot-air balloons being spawned at the restaurants or the food places so this is one type of X world scale experience that you can create and I would like to hand it over to Miroslav to show you some other world scale AR experiences that our users are built using our sdk thank you so what Abhishek was just showing was in the unity editor and I just want to highlight the fact that if this was that was outside of the unity editor where you would be seeing would be either an AR device or your mobile handheld and the world around where you're not seeing the sky box is actually the world around you so those buildings that he had shown blown up to world scale they can either be overlaid over the real world ones or you can just not have them there and you have those hot-air balloons flying over the real places in the world so that really shows that it's a short leap from location-based gaming to world scale AR gaming everything that we just showed are the building blocks and so I want to walk through a couple of different examples of things that have been built using our sdk and in world scale a-arm hotstepper is an app in the App Store they have this hilarious character that that guides you from point A to point B and they use sort of our full stack of api's from maps to navigation API but the most interesting thing is that this character when it walks past places like barber shops for example his hair changes or his hat changes and so all of a sudden this character is aware of the world around you and is creating a much more delightful and engaging experience for your for your for your users or your players so this is a really interesting use case for Pio eye information we're also really proud that they won a Webby Award in 2018 this next example is a skeleton fighting game in a park and so just as Abhishek was showing you he used the park layer that he filtered out you use that same method to spawn gameplay anywhere in the world where you're where there's a park so this game starts when you enter a park and you can for example as far as usability goes start the AR experience when somebody enters a park and these skeletons walk on the park pathways and are using the Unity navmesh and won't fight you until you get close to them and this is scalable right so you don't have to go and mark every single Park in the world for this to happen all you do is you use that layer that Abhishek showed and all of a sudden anywhere in the world that's a park this game starts so it's extremely powerful and when you start to think about world scale AR you get occlusion so just like Abhishek dropped those hot-air balloons at particular POS we have here an example of hey let's drop an astronaut on all the Starbucks in the world and then when you go into full immersive world scale AR they're there but that 3d building data actually provides occlusion so that means that one object in front of you is blocking the other object behind it so if you watch you see that the astronauts leg is being blocked and his shadow or her shadow is being projected on the wall behind Andy and it's super powerful especially when you start to think about immediate limitations around how close you need to be something for AR to work properly and this is going to be increasingly prolific and common especially as a our glasses inter consumer use more significantly you're inevitably going to see games in that context and those games who are going to be immersive and they will require location so this is an example of ODG using our sdk to power and an AR based navigation experience using wearables so everything that we just showed in the SDK is what you need to get to this so that's already possible and you can get started matte box comps last unity we have a really generous free tier so you can get going right away and we're really excited to see what you built we'd love to talk with you see what you're interested in we love collaborating with really interesting projects so please reach out to me or Abhishek our info is up there and we have a booth in the expo where you can play around with our SDK and get a sense of what it feels like so thank you we can answer some questions if people have anything they're curious about we've got some mics right here thank you hey thanks for the presentation I would like to ask what's the coverage so you really like have informations about the building height and so on for a whole world or yeah so global coverage and for things like you know 3d building generation much more populated areas are going to have much more clearer building coverage but generally speaking it's global coverage building data things mm-hmm all right we'll let you all go and then if anybody has particular questions happy to answer them thank you all very much thank you [Applause]
Info
Channel: Unity
Views: 24,407
Rating: undefined out of 5
Keywords: Unity3d, Unity, Unity Technologies, Games, Game Development, Game Dev, Game Engine
Id: -RMdkG0VL4A
Channel Id: undefined
Length: 26min 44sec (1604 seconds)
Published: Mon Jul 23 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.