Sponsored By

Dragons Fly over China. Vikings land in Rural Michigan. They’re Forging New Mobile Location-Based Games Territory

Microsoft just released a new evolution of mobile location-based games with DreamWorks Animation and HitPoint Games. Here we describe the challenges we encountered, and how we overcame them. A tool kit for 3rd party developers is also in the works.

Pete Mauro, Blogger

August 22, 2014

10 Min Read

This summer will mark my 11th year as an Uber driver. My steady clients are two 9 and 11 year old girls. On weekends, I herd them into the car and relinquish my phone for their amusement until we arrive at our destination when I wrestle my phone back out of their hands. Just like parents of old were Yellow Cabs drivers, who typically came packaged with Nokia 6810’s, car rides and road trips with kids take a bit of planning.  This family behavior was on our minds when we created DreamWorks Dragons Adventure: World Explorer, a new evolution of mobile location-based games, with DreamWorks Animation and HitPoint Games.

Before we began, we asked ourselves how we make a mobile location-based game for kids’ everyday drives, as well as long road trips.  What if we could transform our real-world scenery into the game (in real-time) as we drove through it?  What if the game knew where we we’re going and automatically wound down when we arrived at our destination to make the parent/kid transitions out of the car easier?

Different? Fun? Hard to make? Yes! The whole team lived to tell the tale, so here’s our story. Many of the lessons learned in hindsight would fall in the “no duh” category—but in truth until you get on the road with the beta of a location-based game, it’s hard to predict the obstacles you’ll run into, including stoplights!

The new game for Windows devices is meant to be played either at home or in the car.  While playing in the car, the game layers real-world data including weather, time of day, and everything you pass on the road--like streets, schools, buildings, parks, lakes and popular locations--on top of the fantasy world of the Island of Berk from the DreamWorks Animation film, “How to Train Your Dragon 2.” 

You fly your dragons over the actual world around you, only it’s being transformed into your own Viking village, updating in real-time as you drive along.  Before hopping in the car, you enter your destination and the app incorporates data from Foursquare, HERE Maps, and The Weather Channel to customize the gameplay to your real life.  It even takes into account traffic (which is sheep by the way).

Our intention all along was to create a platform that other developers can build upon for new games and apps.  I hope the fun we had and the lessons learned will inspire others to create location-based apps and expand the vision.

The Nitty Gritty:

After creating the fantasy game environment, the first essential incorporation was with HERE Maps.  HERE Maps is the foundation and core for the game, providing road information, water location, GPS and directions.  HERE Maps, created by Nokia, brings the power of “sight” to your map so you can see where to go by following virtual signs on your screen.

Next, we added The Weather Channel and Foursquare. By the way, Foursquare has more than 30 million points of interest worldwide, so it was a good choice. That gave us a ton of data for the game. All three of these technologies combined make the game very real, because if it’s raining outside where you are playing, your Viking village is also getting drenched. If you pass an area where a lot of people check into Foursquare (like in Times Square) you'll see a ton of Vikings milling around.

As you fly around on the back of a dragon by tilting your device, you’ll find even more reality-bending components in the game. For example, the time of day is accurate, and so is the lighting from the sky from day to night. Locations show up in the game as relevant points of interest in the fantasy world, and the “cart” in the game drives the same path as the real car a child or player is in.

Testing / Discovering the Unexpected:

As we were building the game, we couldn’t do the traditional testing in our labs, for obvious reasons.  Instead, we hit the road and had friends around the globe do the same.

Some funny challenges popped up along the way. 

  1. Buildings showed up in the middle of the ocean. At first we thought it was a bug, but then realized - there are a lot of people who check into Foursquare on cruise ships. So, we made the bug into a feature by adding boats to the game.

  2. In some regions, Foursquare primarily picks up gas stations.  Hurray! How much fun is that?  So, we tailored the game to show those locations as more interesting POIs.

  3. In rural areas not mapped, we had to plug in generic (new categories of buildings) to make the real world interesting in the game without freaking out a kid by showing a non-existent place of establishment in their home town.

  4. In NYC, GPS accuracy would plummet with all the skyscrapers; and our cart would start driving across grass since the game wasn’t sure where we were. So, we made adjustments and added intelligence to snap the cart back onto the nearest road until the accuracy improved.

  5. In China our players had constant connectivity errors that baffled us for days. It turns out that many US sites are blocked by the Chinese national firewall, so we had to change how we validated internet connectivity.

  6. It mainly rains in Redmond in the winter, but if the device unexpectedly loses its data connection, we assume it’s a bright and sunny day.

Then, we discovered unexpected, yet important nuances that came with combining the DreamWorks IP with location services.   

  1. When the car is going 50 miles and our dragon flies 120 miles an hour, what do we do?  Make Mom speed up the car? 

  2. What happens when we get stuck in traffic?  Let the game stall?

  3. What if we can’t bring the sheep back because a service goes down?  Ah, just let them wander!

Dragons Adventure Rescuing SheepThe answer to all was to instigate mini games at certain moments and add intelligence, so the game still feels real, exciting and continuous.

Another issue was caching mapping information to improve performance and reduce amount of data needed in a real-time game. Kids (nor adults for that matter) don’t want to wait for 3D information to download. By caching, we keep the game on the move.    

Location- Based Technical Challenges:

We were lucky enough to work with a stellar, developer named HitPoint Inc.  Paul Hake, HitPoint’s COO, describes an even deeper dive into the technical aspects of building the game:

Developing the game in Unity was primarily a blessing and definitely let us add more features than we would have been able to if we’d written a custom engine. Unity does have its idiosyncrasies, so we spent time focusing on performance, especially since our device target list included several low-to-mid-range Windows phones and tablets used primarily overseas. 

As far as the location-aware features in in the game, the core feature of transforming the world map into a skinned version was a process of pulling specially-formatted map tiles generated by HERE Maps, and running a simple image processing algorithm on them to generate geometry for things like roads, bodies of water and land. This geometry is stored in vector format, and then used to "paint" a texture set (via standard splat maps) onto Unity-generated terrain tiles. Each region of the geometry is assigned a different texture from the set, so that road regions are painted with a road texture, ground with ground texture, etc. This approach works pretty well, and produces the desired "alternate reality" effect the designers were going for. 

For a while, though, we thought we had a strange bug in our system because while trying to navigate around Japan, we could find almost no roads. It seemed like a mostly uninhabited island. That is until we learned that the mapping service today only has data for major highways in Japan, not minor roads. Needless to say this was a bit frustrating, but it was good to understand the cause, and create a work-around.

With Foursquare, we incorporated POIs into the game, which are represented again as stylized versions of those venues using the game's art style.  Since the game involves flying around at fast speeds, one of the technical hurdles was in optimizing the number of calls we make to the Foursquare API as the game continually queries for new POIs in the new areas the player flies over.

The Foursquare service is rate-limited, so we had to implement some clever rules and a caching system to keep calls down. Foursquare was kind enough to increase our allotted rates, easing our burden a bit. Some of the more interesting experiences we had integrating this feature though came from the fact that Foursquare is primarily built upon user-generated content. Since a lot of the core mechanics of the game are tied to interacting with POIs, balancing the game to be fun in arbitrary locations was a challenge, to say the least.

Venue's like "Billy's House" occasionally show up in rural areas where there aren't many competing popular POIs. In one instance, for one of the game's missions in Turkey, we again thought we had a bug in our code that was attempting to route the player right out into the middle of the water, where sat a lonely POI. Upon further inspection, we discovered that it was a boat or ferry of some kind that someone had logged as a venue on Foursquare while in the middle of their trip. These types of special cases are always fun to engineer around, and a common occurrence when dealing with user-generated content. 

Other features--like integrating weather effects based on the weather reported via The Weather Channel as well as setting the lighting in the game based on Internet time for the player's location--were more straightforward and a blast to implement. These types of small, real-time data feeds are a big part of what gives the game its charm and immersive feel.

Overall, for our team of engineers, learning experiences were incredible—and all done in a 3-month window!  We're happy with how the game turned out, and now we’re making some post-launch tweaks and improvements. So far, players seem to really love the experience.  

The Development Kit, and What’s Ahead:

Microsoft’s intention, from the beginning, was to make a platform for developers to build upon.

At the same time, though, if a developer wants to work with an existing IP, we recommend forming a strong partnership.  DreamWorks happily provided 3D assets to incorporate into the game.  For example, for the movie itself, they had something like 1,000 control points for a human smile.  We didn’t need that for mobile, so they provided the right amount of control points for our game. And of course, we had to make adjustments for all devices.

We have a stack of concepts for a number of apps, not just games.  Some could be educational and teach people about their surroundings and history.  There are other functional experiences for travelers. We’re hoping this new type of mobile entertainment will take off, and developers will pick up the ball and create new experiences. With what we’re seeing so far, consumers are very excited for this expanding type of game play.

Our tool kit for 3rd party developers is in the works.  Stay tuned for its release.  In the meantime, please feel free to comment. We’re excited to see the next iterations of location-based games and apps.

We’re already getting many questions about how folks can ‘climb on board’ and develop. We would love to hear from you, too! Email me: [email protected].

Read more about:

2014Featured Blogs

About the Author(s)

Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like