Back in March 2012, Tim Schafer's Double Fine Productions blew the doors of its Kickstarter for Broken Age.
The decidedly modern, retro-styled point-and-click adventure game raised 834 percent of its initial funding goal - and with those funds in the bank, Double Fine planned to roll it out to five different platforms.
The problem, as laid out by graphic programmer Oliver Franzke at GDC 2014 last week, is that Double Fine's five platform approach was a miscalculation.
"In our optimistic view there were five platforms," Franzke began.
"Windows, OSX, Linux, iOS mobile and tablets, and Android mobile and tablets. But, as we quickly learned, it's more than just five platforms."
"In our pessimistic view, it was more like eight plus platforms: Windows, OSX, Linux, iOS mobile and tablets, and Android mobile and tablets - which includes PowerVR, NVIDIA, Qualcomm, Vanilla Android, and derivatives like the Ouya."
Fragging out frustrations
Franzke identified the disaparate graphic processing units (GPUs) as the main challenge with Android performance as these chips are "very different" and that often developers have "no exact knowledge of device capabilities" due to the wide variety of models available on the market.
"If you want to get really, really angry, go this website and look at Android fragmentation," Franzke said with a dry laugh while pointing to the image below..
Of course, fragmentation in the Android ecosystem was just part of the problems Double Fine ran into with scaling Broken Age down to mobile.
"The overall goal is to maximise throughput, so we can get every HD ad looking beautiful," Franzke began.
"With a typical PC thats plugged into a wall, you have lots of VRAM and higher power consumption - close to 100 watts per hour.
"But with mobile, you have much lower power consumption - under 100 milliwatts per hour... and you have to keep the amount of draw calls low - under 100 - and that's not a lot if you work in console and PC games," Franzke noted.
The solution to Double Fine's scaling issue was a clever "hybrid rig" for characters that used skinned geometry alongside richer flipbook animation.
This allowed the characters at the heart of Broken Age to be every bit as expressive as its story demanded while dramatically reducing the burden each character placed on the mobile device.
Although not said by Franzke, the end result of the hybrid rig approach is similar to the type of animatronic puppets used in The Nightmare Before Christmas or Corpse Bride.
Each Broken Age character possessed a pre-rendered, simple skeletal architecture, and Double Fine's artists could swap out individual pieces on top of the skeleton to create the desired animation and expressions.
"There are roughly 1.3 hours of cutscenes in Act 1 of Broken Age," Franzke pointed out, "so the characters really need to be expressive."
While other tricks like lighting tweaks, shader refinements, and environmental clip masking were all used to minimize the resource requirements, the hybrid rigs ultimately allowed Broken Age to scale down to mobile.
"A typical scene drawn in a naïve way would lead to 452 draw calls - this would make your mobile device cry," Franzke began.
Batching draw calls dropped the number down to 220, while optmised batching - which Franzke described as "one, big uber-rig" of networked hybrid models, brought the number down to 101.
To summarize the efficiency of hybrid rigs, Franzke compared the traditional "flipbook" animation of Shay - one of Broken Age's protagonists - to the hybrid rig model.
In the hybrid rig model, Shay only took up 36MB worth of assets spread across 122,218 animation frames. For the flipbook estimation, Shay would've required 7.4GB of compressed textures to bring him to life as Double Fine wanted.
"This was a huge win for us, and it would have been a disaster for mobile devices otherwise", Franzke concluded.