Sponsored By

How We Tackled 3 Common Issues With Bringing AAA Mobile Games to Android

A synopsis on how Pocket Gems addressed three common issues when bringing our 3D multiplayer game, War Dragons, from iOS to Android.

Priyanka Jindal, Blogger

April 20, 2016

6 Min Read
Game Developer logo in a gray background | Game Developer

A year ago, Pocket Gems launched War Dragons on iOS. It was a huge technical challenge that represented a lot of ‘firsts’ for us. Not only was the game a departure from our usual casual fare, it was our first game with rich 3D graphics and real-time multiplayer over mobile networks. It was such an undertaking that we ended up building a whole new tech stack, the Mantis Engine, to pull it off.

This month, we launched War Dragons on Android. If developers have a goal of creating a hit mobile game on a global scale, it is essential to have a presence on Android (which accounts for about 60 percent of total market share). The need for an Android version of War Dragons was also something we felt directly, with our players asking us every day when they would be able to play on the platform.

We’re no strangers to cross-platform development. Since 2009, we’ve developed about 15 games for Android and learned a ton in the process. But War Dragons was different. We had to address challenges such as how to bring a AAA mobile game to lower-end Android devices and how to build best mobile performance tools and infrastructure.

As the quality bar for mobile games continues to rise, I believe some of the lessons we learned in bringing War Dragons to Android will be valuable to other developers. Here’s how we addressed three common issues when launching a high-quality mobile game on Android.

Setting the Bar at a 2012 Device Year Class (KitKat and OpenGL ES 3.0+)

Android has a very diverse ecosystem which spans all kinds of devices and different versions of operating systems, manufacturers and hardware configurations. When bringing a AAA game to such a wide array of devices, developers need to optimize for high end devices while still providing an exciting player experience on lower-end devices.

To do this, we borrowed Facebook’s open source device year class implementation which buckets Android devices dynamically based on RAM, CPU cores and CPU clock speed. This made it easier to segment Android devices based on the expected phone performance rather than by the year they were released. Our data suggested that targeting device year class 2012 and above would allow us to ship a high quality version of War Dragons while we continued to iterate on issues with older device classes.

Supporting KitKat (Android OS 4.4+) is also important as a large percentage of devices released in 2013 and 2014 continue to run on this operating system version.

Additionally, we found that OpenGL ES 3.0, a cross-platform graphics API that specifies a standard software interface for 3D graphics processing hardware, would be required to implement draw call batching using Geometry Instancing. Draw call is a command to the mobile GPU to draw a mesh and an expensive operation of a graphics application.

According to Google’s recommended guidelines, OpenGL ES 3.0 is supported by Android 4.3 (API level 18) and higher. However, we encountered that some device manufacturers didn’t support OpenGL ES 3.0 API even on devices running 4.4+ We hope to add backward compatibility for devices that don’t support OpenGL ES 3.0 in our future releases.

Optimizing Our Proprietary Tech, The Mantis Engine

War Dragons is Pocket Gems’ first game that has true synchronous multiplayer experience, meaning players can attack and defend bases in real-time while calling on their teammates to help join the attack or assist in fighting off enemy dragons.

In an Android game like this, experiences can differ significantly due to different hardware types and varying network conditions. We accounted for these differences by improving the performance of our Mantis Engine. This mainly entailed resolving CPU and GPU bottlenecks. We also had to consider how to reduce memory usage and effectively address our networking stack bottlenecks.

Modern Android devices have multi-core CPUs. This means that to get the best performance,  game engines must be multi-threaded. War Dragons on iOS already used multiple threads for such tasks as network requests and loading assets.

For Android, we took this a step further by making Mantis’ rendering pipeline multi-threaded.The game’s main logic thread now only queues rendering operations which are then played-back by a separate rendering thread. This frees the main logic thread to move onto processing the next frame whilst the rendering thread is submitting rendering commands to OpenGL in parallel.



By using GPU profiling tools, we also discovered a second bottleneck was the number of draw calls per frame. Our 3D assets and effects were carefully constructed to use as few draw calls as possible. However our 2D UI originally used a large number of small textures and accounted for a large percentage of draw calls. By dynamically atlasing textures and batching UI geometry, we were able to dramatically reduce the number of draw calls used by the game’s UI. This optimization was particularly effective in improving the frame-rate on medium-end devices.

RAM requirement depends on the application and will be different for each developer. On a game like War Dragons, where our goal is to support high quality 3D textures in a variety of native resolutions, reducing memory usage was important. The War Dragons memory footprint was reduced by using proprietary hardware accelerated texture formats including ATITC for Adreno GPU, PVRTC for PowerVR GPU and ETC1 for the rest of GPU categories. In doing this, we not only observed reduced memory usage but also gains in frame-rate.

We also reduced data usage by up to 3x compared to an earlier release in beta by optimizing our battle networking protocols. This allowed for streamlined real time battles, reduced the battle disconnect rates and was critical for player engagement. Ultimately, we achieved parity with our  iOS networking stack.

Building Infrastructure for Performance and Analytics

Pocket Gems is a company of builders. For example, when Harlan and Daniel made Tap Farm back in 2009, there was no system for microtransactions on mobile, so they made their own. This has carried through the company up to the Mantis Engine and beyond.

Google has many fantastic tools that work for a majority of issues most developers face. However, War Dragons had a few unique circumstances where it made sense for us to build our own tools.

Here’s a quick summary of the things we built from scratch for War Dragons Android

  • In-game debug utility tools:  

    • Track real-time memory spikes.

    • Frames drawn per second drops.

    • Ability to add or remove specific assets to track overheads in real time.

  • Automated simulation infrastructure running on our own little device farm to track performance metrics with each iteration.

  • Crash reporting that better segments signal or exception, foreground and background out of memory scenarios.

  • Efficiently collecting traces to debug problems faster.

We’re incredibly excited to be bringing War Dragons to Android and look forward to hearing what our Android players think about the game.

As anybody who’s shipped a mobile game can attest to, the real work begins on launch day. As such, I’m sure this list will grow and change in the coming months as we continue to optimize War Dragons for Android. In the meantime, I thought other developers could benefit from some of our experiences. Please feel free to ask me any questions in the comments!

Read more about:

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

You May Also Like