Lollipop Land — Game for Android

Lollipop Land — Game for Android

Lollipop Land is a fun game based off the Android 5.0 Easter Egg. 🍭

Lollipop Land

Lollipop Land is a fun game based off the Android 5.0 Easter Egg.

Lollipop Land

Fly bugdroid through the Android dessert forest, through the sea of swirly twirly lollipops. Jump your way through this delicious lollipop land.

Get it on Google Play


This post will explain how my first game, Lollipop Land, came to be.

Android Version History

Something you may not know about Android is that each major release is named after sweet foods and candies, in alphabetical order. The first public release of Android was code-named Cupcake. Here is a chart I made for each Android version code-name (as of 2014):

Andoid Version History

Android Easter Eggs

“Easter eggs” are hidden symbols, messages and jokes worked into movies, books, paintings, video games and computer software—often intended as a little “reward” to viewers who are paying close attention or know where to look. And in fact, there’s probably an Easter egg in your Android device right now. — verizonwireless

Starting with Android version 2.3 (Gingerbread) Google started adding an “Easter egg” into each release. You can find the Easter egg by going into Settings, then About phone, and then rapidly tapping on Android version.

Gingerbread’s Easter egg was an Android mascot surrounded by zombies. Honeycomb’s Easter egg was an Android bee. The Ice Cream Sandwich Easter egg, dubbed “Nyandroid”, was based off the popular YouTube video Nyan Cat. Jelly Bean’s Easter egg consisted of tons of jelly beans floating around on the screen. The KitKat Easter Egg was a beautiful mosiac which displayed all the previous releases of Android, including some rare images which show what Google considered naming previous releases (Flan, JandyCane, and Key Lime Pie).

The Lollipop Easter Egg

Android 5.0 Lollipop is the biggest update of Android to date. The Android blogosphere could not get enough of the rumors surrounding the next version of Android. If you watch any of the reviews of Android 5.0 on YouTube, chances are the reviewer showed off the new Easter egg.

When you first open the Easter egg you see a huge Lollipop. After clicking the Lollipop 6 times, followed by a long-click, a beautiful Lollipop world is displayed to the user. This Lollipop world was undoubtedly inspired by the 2014 hit game Flappy Bird. Instead of the bird, your player is the Android mascot (bugdroid). Instead of retro-themed pipes, the barriers are Lollipops. When you click the screen you automatically go into game-play. The object of the game is to pass through each Lollipop barrier by tapping on the screen to keep bugdroid from hitting the ground.

Lollipop Land — The Game

When I first saw the Lollipop Easter egg I immediately wanted to turn it into a full-fledged game—adding Google Play Games Services with leaderboards and achievements, different difficulty settings, sounds, and other features.

On November 3rd, 2014 Google pushed the Android 5.0 source code to AOSP. Now anyone could see how the developer team at Google created this lollipop world. In less than one day I had the first version of Lollipop Land on Google Play.

Development

Finding the Easter Egg

If you read the output given by logcat you can see which Intent is launched when you open the Easter egg. For Android 5.0 we can see the following output:

Displayed com.android.systemui/.egg.LLandActivity

The log shows us both the package and class name (<package>/<class>). We can see that this Activity resides in the SystemUI package. Since Android is open source we can find the source code for LLandActivity.java which is launched from PlatLogoActivity.java. LLandActivity simply shows a view which extends FrameLayout named LLand.

Porting the game to work on lower-end devices

LLand uses new APIs that only exist on Android 5.0. In order to back-port this class to run on lower versions of Android some changes are needed. Some newer APIs used in LLand are VectorDrawable, setTranslationZ(float), ViewOutlineProviderget.getOutline(android.view.View, android.graphics.Outline), and others.

VectorDrawable - Google’s answer to SVGs on Android.

The images displayed in the game are drawn using the new VectorDrawable. First, I attempted to convert all the VectorDrawables to SVGs and use a third-party library which adds SVG support, like android-svg. This wasn’t working as expected so I ended up writing some code to convert the VectorDrawables to PNGs Overall, back-porting the game to Android 4.0+ was not very hard. After a couple of hours from when Android 5.0 source hit AOSP I already had the game running on lower-end devices.

Adding sounds:

Finding sounds for a game was more time-consuming than I expected. I spent several hours looking for sounds that had a license I could use on a game published on Google Play.

Google Play Services:

Google Play Services adds the ability to add achievements and a leaderboard to compete with friends. The only problem with Google Play Services is that… it is a monolith abomination (edit: not anymore). Google Play Services greatly increased the size of my APK and added, in my opinion, many unnecessary resources to my project. This was the most demanded feature, so, in the end, it was definitely worth it.

Other Features:

The most discussed topic around the game is how insanely difficult it is (which also makes it addictive). The original version seems almost impossible to get a score above 1 point. Lollipop Land has added difficulty levels, and I have other features planned for future releases. The game doesn’t require any permissions and is 100% completely free.


Results

In less than one week Lollipop Land has had over 5,000 downloads with no marketing strategy. It was a fun side project for me that I hope you enjoy. If you haven’t tried it yet, go download it and see how many points you can get.