Sunday, May 22, 2016

Ho Ho Ho! Googles Santa Tracker is now open source

Posted by Ankur Kotwal, Software Engineer

The holiday spirit is about giving and though we’re early into April, we’re still in that spirit. Today, we’re announcing that Googles Santa Tracker is now open source on GitHub at google/santa-tracker-web and google/santa-tracker-android. Now you can see how we’ve used many of our developer products to build a fun and engaging experience that runs across the web and Android.

Santa Tracker isn’t just about watching Santa’s progress as he delivers presents on December 24. Visitors can also have fun with the winter-inspired games and an interactive North Pole village while Santa prepares for his big journey throughout the holidays.

Below is a summary of what we’ve released as open source.

Android app

  • The Santa Tracker Android app is a single APK, supporting all devices running Ice Cream Sandwich (4.0) and up. The source code for the app can be found here.
  • Santa’s village is a canvas-based graphical launcher for videos, games and the tracker. In order to span 10,000 pixels in width, the village uses the Android resource hierarchy in a unique way to scale graphics without needing assets for multiple density buckets, thereby reducing the APK size.
  • Games on Santa Tracker Android are built using a combination of technologies such as JBox2D (gumball game), Android view hierarchy (memory match game) and OpenGL with a purpose-built rendering engine (jetpack game).
  • To help with user engagement, the app uses the App Indexing API to enable autocomplete support for Santa Tracker games from Google Search. This is done using deep linking.

Android Wear

  • The custom watch faces on Android Wear provide a personalized touch. Having Santa or one of his friendly elves tell the time brings a smile to all. Building custom watch faces is a lot of fun but providing a performant, battery friendly watch face requires certain considerations. The watch face source code can be found here.
  • Santa Tracker uses notifications to let users know when Santa has started his journey. The notifications are further enhanced to provide a great experience on wearables using custom backgrounds and actions that deep link into the app.

On the web

  • Santa Tracker on the web was built using Polymer, a powerful new library from the Chrome team based on Web Components. Santa Tracker’s use of Polymer demonstrates how easy it is to package code into reusable components. Every scene in Santas village (games, videos, and interactive pages) is a custom element, only loaded when needed, minimizing the startup cost of Santa Tracker.
  • Santa Tracker’s interactive and fun experience is built using the Web Animations API, a standardized JavaScript API for unifying animated content - this is a huge leap up from using CSS animations. Web Animations can be written imperatively, are supported in all modern browsers via polyfills and Polymer uses them internally to create its amazing material design effects. Examples of these animations can be found using this GitHub search.
  • Santa believes in mobile first; this years experience was built to be optimized for the mobile web, including a fully responsive design, touch gesture support using Polymer, and new features like meta-theme color and the application manifest for add to homescreen.
  • To provide exceptional localization support, a new i18n-msg component was built, a first for Web Components. Modeled after the Chrome extension i18n system, it enables live page-refresh for development but has a build step for optimization.

Now that the source code is also available, developers can see many of the parts that come together to make Santa Tracker. We hope that developers are inspired to make their own magical experiences.

Related Posts by Categories

0 comments:

Post a Comment