The making of Terraria mobile, Part 1 — Breaking ground

4 min read Original article ↗

How we brought the best-selling sandbox game to iOS & Android

David Welch

Press enter or click to view image in full size

Terraria was released on the iOS App Store on August 29, 2013 — over 11 years ago. Like the console versions of the game, I worked on the mobile versions very deeply, for many years. As of June 2024, Terraria has sold over 58 million copies across all platforms — with at least 12 million of those being the iOS and Android versions. Wild.

I previously talked about the process of adapting Terraria to Xbox and PlayStation. But given its success on mobile, I figured it’d be worth talking about that experience as well. I’m proud of that work — and I’m proud it’s given joy to so many players.

In 2012, I helped 505 Games negotiate the license to bring Terraria to consoles. But as part of that same deal, we negotiated to bring the game to phones and tablets. After all, Minecraft: Pocket Edition was selling like crazy, so it made sense to try our luck with Terraria as well.

But we were assuming, of course, that it was even technically possible to do. And that we could make it fun to play.

This was by no means certain! Like with the console version, Terraria’s success on mobile wasn’t guaranteed — it took very hard work to make it playable, much less fun.

The process of bringing Terraria to Xbox and PlayStation had been full of interesting and tricky problems. But the process of adapting it for touch screens was in some ways even more fascinating — and challenging.

Picking teams

For the Xbox 360 and PlayStation 3 versions of Terraria, we’d hired Engine Software, a Dutch game developer, given my experience working with them on a couple kids games for Nintendo DS.

However, it became pretty clear to me, pretty quickly, that they’d have their hands full with just these versions. I realized I needed to find another team to take on the iOS and Android versions — ideally a team with experience on those platforms.

In 2012, there weren’t a lot of people with that experience. It’d only been a few years that the Apple and Google app stores had even been open to 3rd-parties, and writing software for the devices was notoriously tough due to hardware constraints and proprietary tools.

Still: one such team was Codeglue, another Dutch studio (which has since been acquired by Behaviour Interactive). I’d heard they were great programmers, and they’d done a couple small projects for iOS and Android. I’d been particularly impressed by a small, retro-themed action game they’d made called Rocket Riot.

Press enter or click to view image in full size

Peep those voxels 👀

Plus, the Dutch game industry was small. Codeglue and Engine Software knew each other, so I figured that if either of them ran into trouble, they could compare notes.

Codeglue put together their estimate for the work, which included an initial proposal for how they could adapt the touch controls. I got the greenlight from the 505 leadership, and we were off — though we knew there would be hurdles along the way.

A tight fit

The first obstacle was the hardware. It’s a little hard to remember, given that modern phones can play many Xbox or PlayStation games at an almost comparable level of quality — but the first smartphones were quite primitive. Their ARM-based architectures were designed to be battery-efficient, not super performant. They didn’t have much in the way of graphics acceleration.

A state-of-the-art iPhone 4

Popular games at that time were things like Angry Birds and Temple Run — not super demanding stuff.

Even Minecraft: Pocket Edition was dramatically simpler than the PC or console editions, especially in terms of world size. For Terraria’s mobile version, we’d likewise need to dramatically reduce things like world size, display resolution, and lighting.

As I talked about in the past, the PC version of Terraria was written in C# using the XNA framework, but for PlayStation 3, Engine Software needed to translate the source code from C# to C++. Luckily, Codeglue was able to use that C++ codebase as a springboard for the iOS and Android versions, which they’d then combine with internal technology they’d already built for those platforms.

Getting Terraria up and running on an iPhone at a rudimentary level — i.e. generating a world and rendering a character in it — was by no means trivial. But due to the existing PS3 code, and Codeglue’s existing tech — they were able to achieve it pretty quickly.

But like with Xbox and PlayStation, the real challenge would be the controls.

Continued in Part 2.