How To Support Gear VR and Google Cardboard In One Unity3D Project

Google Cardboard is a huge success. Cardboard’s userbase currently dwarfs that of Gear VR. Users, investors, and collaborators who don’t have access to Gear VR often ask for Cardboard versions of my games. As part of planning what to do next with Caldera Defense, I decided to create a workflow to port between Gear VR and Cardboard.

Always keep a Cardboard on me at ALL TIMES!

I used my VR Jam entry, Duck Pond VR, as a test bed for my Unity3D SDK switching scripts. It’s much easier to do this on a new project. Here’s how I did it:

Unity 4 vs. Unity 5

Google Cardboard supports Unity 4 and Unity 5. Although Oculus’ mobile SDK will technically work on Unity 5, you can’t ship with it because bugs in the current version of Unity 5 cause memory leaks and other issues on the Gear VR hardware. Unity is working on a fix but I haven’t heard any ETA on Gear VR support in Unity 5.

This is a bummer since the Cardboard SDK for Unity 5 supports skyboxes and other features in addition to the improvements Unity 5 has over 4. Unfortunately you’re stuck with Unity 4 when making a cross-platform Gear VR and Cardboard app.

Dealing With Cardboard’s Lack of Input

Although Gear VR’s simplistic touch controls are a challenge to develop for, the vast majority of Cardboards have no controls at all! Yes, Google Cardboard includes a clever magnetic trigger for a single input event. Yet, the sad fact is most Android devices don’t have the necessary dock connector to use this.

You have a few other control options that are universal to all Android devices: the microphone and Bluetooth controllers. By keeping the microphone open, you can use loud sounds (such as a shout) to trigger an action. You can probably use something like the Pitch Detector plug-in for this. Or, if your cardboard has a head strap for hands-free operation, you can use a Bluetooth gamepad for controls.

Because of this general lack of input, many Cardboard apps use what I call “stare buttons” for GUIs. These are buttons that trigger if you look at them long enough. I’ve implemented my own version. The prefab is here, the code is here. It even hooks into the new Unity UI event system so you can use it with my Oculus world space cursor code.

Gear VR apps must be redesigned to fit within Cardboard’s constraints. Whether it’s for limited controls or the performance constraints of low end devices. Most of my Cardboard ports are slimmed down Gear VR experiences. In the case of Caldera Defense, I’m designing a simplified auto-firing survival mode for the Cardboard port. I’ll merge this mode back into the Gear VR version as an extra game mode in the next update.

Swapping SDKs

This is surprisingly easy. You can install the Cardboard and Gear VR SDKs in a single Unity project with almost no problems. The only conflict is they both overwrite the Android manifest in the plugin folder. I wrote an SDK swapper that lets you switch between the Google Cardboard and Oculus manifests before you do a build. You can get it here. This editor script has you pick where each manifest file is for Cardboard and Gear VR and will simply copy over the appropriate file to the plugin folder. Of course for iOS Cardboard apps this isn’t an issue.

Supporting Both Prefabs

Both Oculus and Cardboard have their own prefabs that represent the player’s head and eye cameras. In Caldera Defense, I originally attached a bunch of game objects to the player’s head to use for traces, GUI positioning, HUDs, and other things that need to use the player’s head position and orientation. In order for these to work on both Cardboard and Oculus’ prefabs, I placed all objects attached to the head on another prefab which is attached to the Cardboard or Oculus’ head model at runtime.

Wrapping Both APIs

Not only do both SDK’s have similar prefabs for the head model, they also have similar APIs. In both Cardboard and Oculus versions, I need to refer to the eye and head positions for various operations. To do this, I created a simple class that detects which prefab is present in the scene, and grabs the respective class to wrap the eye position reference around. The script is in the prefab’s package.


For the final step, I made separate Cardboard versions of all my relevant Gear VR scenes which include the Cardboard prefabs and modified gameplay and interfaces. If no actual Oculus SDK code is in any of the classes used in the Cardboard version, the Oculus SDK should be stripped out of that build and you’ll have no problem running on Cardboard. This probably means I really need to make an Oculus and Cardboard specific versions of that CameraBody script.

The upcoming Unity 5.1 includes native Oculus support which may make this process a bit more complicated. Until then, these steps are the best way I can find to support both Cardboard and Gear VR in one project. I’m a big fan of mobile VR, and I think it’s necessary for any developer at this early stage of the market to get content out to as many users as possible.

Adult Contemporary Video Games

One of my favorite Combat Jack podcasts of 2014 is when they interviewed legendary hip hop producer, Marley Marl over the Summer.  Marly Marl invented the modern hip-hop sound most take for granted and created the Juice Crew, one of the most important groups of MCs ever.

The Juice Crew

Before producing hit records, Marley had a career as an on-air DJ, starting on Mr. Magic‘s show on KISS-FM in New York.  In the ’90s he went on to host “Future Flavas” with Pete Rock on Hot 97.  Marley Marl was also still producing hit albums for the likes of LL Cool J and Lords of the Underground.

Times change, and Marley Marl isn’t producing music for 20 year olds anymore.  While many DJs desperately hang on to their fading youth, Marley tried another tactic.  He moved over to WBLS which plays old school hip hop for a mature audience.

it just so happens, rap fans in their fourties and beyond have far more disposable income than those in their teens and twenties.  His WBLS show has gone on to be a great success.  It turns out that despite being a youth-powered movement, there’s plenty of advertising dollars in hip-hop appealing to older rap fans.

This got me thinking about video games.

A lot of veteran developers are debating about the decline of AAA games in the face of the disruptive waves of free2play and mobile.  Many gamers in their demographic agree.  If that’s the case, why not appeal to this older audience?

The challenge to monetizing these gamers is that although they have the same taste in games they may have had over a decade ago, their play styles are vastly different due to lifestyle changes.  If you’ve got kids or a demanding job, perhaps you no longer have 120+ hours to spend playing an RPG. However, you might digest the same style of game in shorter episodic bursts on a tablet or smartphone.

Some developers have caught on to this and produce what I call Adult Contemporary Video Games.  A good example is the 1980s pencil and paper RPG, Shadowrun.  Microsoft’s attempt at AAA shooter based on Shadowrun was an abject failure (although I quite liked it).  Five years later, Harebrained Schemes went from a surge of support on Kickstarter for “Shadowrun Returns” to a series of popular mobile and PC downloadable games based on the franchise.

Shadowrun for iPad

This is a smart strategy–delivering content aimed at an older audience on newer devices.  Those of us who grew up not on just the original RPG, but the SNES and Genesis games were ripe for a new entry in the series.  This model has also seen success with Wasteland 2, and surely the upcoming Bard’s Tale sequel will continue the trend.

It remains to be seen if you can develop a new IP targeted at this audience.  A lot of what you hear on Adult Contemporary radio is old artists making new music.  In games it may be the same. So far, the genre seems to bank on nostalgia by resurrecting classic franchises for an older audience on new devices with updated play styles. Especially if you include teh current wave of retro remakes. While some veteran developers excel at creating games for the new mobile f2p masses, others may be more suited for this viable slice of the market.

How to survive the mobile gaming apocalypse

I was listening to the latest Walled Garden podcast and towards the end they stopped just short of stating what many developers I talk to have been saying–mobile gaming is dead.

Ok, not actually dead. After all, mobile gaming revenue is higher than it’s ever been, and mobile consumption of everything is eating the planet. However, mobile gaming is completely dead as a business model for independent developers and undercapitalized startups.

IAP has become so dominant that there’s really only one somewhat reproducible way to make money in the AppStore: make a hamster wheel f2p game in a handful of established genres and spend tens of thousands of dollars a day on user acquisition to drive traffic to it. Despite many bold experiments, the charts increasingly bear this out.


This means that some companies with top charting mobile games aren’t actually making a profit as UA costs can eat up most of the revenue. Surely this will produce a shakeout and consolidation in 2014. This is similar to what happened to Facebook games circa 2010 causing a mass exodus to mobile.

Now that mobile is dead, where should you escape to? There are several options.


The PC, and more specifically Steam, remains the platform of choice for those who actually want to charge money for content. There’s a large market for premium games and Steam has loosened their gate with the advent of Greenlight. Some prominent developers have been abandoning mobile for PC with their new projects. Despite PC sales declining in the face of tablets, it makes sense. This is where the paying customers are.


A lot has been written here about the impending demise of consoles, but Sony and Microsoft managed to change up their business model and product strategy enough to have early success with both the PS4 and XBOX One. One of the big changes has been the thawing of the gated ecosystem and allowing independent developers to self-publish. Oh yeah, and on the Wii U also.

Next generation console owners are starved for content. There will be many independent successes over the next few years before the channel becomes completely saturated.


On one hand VR is merely a peripheral for existing games, on the other it’s part of an entirely new category of wearable computing and an emerging platform. Oculus Rift is the clear leader with a huge round of investment and development kits widespread. However a glut of VR headsets is on the horizon.

Oculus is building an ecosystem out of their device, but VR content can be distributed through any PC gaming channel. Although, supporting every single headset may be a nightmare for developers–isn’t it time for some kind of standard VR API?

Board games

Board games are a cottage industry yet a hot category on Kickstarter. As an example, Sandy Peteresen’s Cuthulu World Combat iOS game Kickstarter failed miserably, but when re-pitched as a board game, it blew past its funding goal. Going from digital to physical presents a lot of new challenges for developers, but does have a dedicated fan base of paying customers. Plus, you can’t pirate a board game!

Facebook / Web

Facebook games ‘died’ in 2010, but are ironically becoming an increasingly common alternative platform for mobile developers. Especially if you have a working web client already, why not put it on Facebook? The problem is the audience is decidedly non-hardcore. Facebook games can still make some money, but for a very specific audience. However, for hardcore games, the open web still remains a viable place to find an audience of paying gamers. Kongregate proves this.

What needs to change in mobile?

The supremacy of f2p and the very few options for user acquisition make the momentum towards free and the companies with enough money to compete in the mobile UA wars insurmountable. Apple could make some changes to the App Store to help support premium games and other alternative business models, however there really isn’t any incentive to do so–Either way, Apple sells phones. It’s difficult to foresee anything but the continuing dominance of f2p and mega-publishers on mobile in 2014. If you have a ton of cash and resources, solving this problem is hard, and thus very lucrative. For the rest of us, plan your strategy accordingly.

Facebook: The Next Generation Game Publisher

Upon the eve of Casual Connect one of the big announcements was Facebook becoming a mobile games publisher. Much like how the launch of Facebook’s mobile ad network went largely unnoticed only to become a huge deal later, I suspect we may see this move in a similar light in the near future.

View from the podium before my Casual Connect event.

View from the podium before my Casual Connect event.

A social network like Facebook directly publishing apps isn’t without precedent. Facebook took their lead from Asian mobile social networks like Japan’s LINE and Korea’s Kakao Talk. Both extended their messaging services to include mobile games that use their respective social network for viral reach in ways similar to the bad old days of Farmville spam.

Both LINE and Kakao Talk have been able to send games to the top of the charts in their native countries netting big revenue. With increasing adoption of messaging applications in the West, this trend may continue here.

In the boxed software era you had few options other than to go through a publisher for distribution. Publishers had guaranteed shelf space at national retailers. Now that software doesn’t exist in boxes, there’s no need for shelves. As we’ve discussed before, users are the new shelf space.

Mobile publishers like GREE and DeNA pride themselves on having a huge audience to advertise games to. This usually involves blowing lots of money buying users through ads–many of which show up on Facebook. Pretty much this is the only service mobile publishers provide.

If user acquisition is all a mobile game publisher does, why not cut out the middleman?

Facebook can acquire users much cheaper than GREE or DeNA–they own the network. In fact, this is a major reason why GREE and DeNA make so much money in Japan. Especially in the feature phone era, they operated mobile social networks they also published their own games on.

Perhaps Facebook did the math and figured out that a cut of an app’s revenue in exchange for premium placement of ads is a profitable exchange. Instead of having an audience of 30-40 million users as DeNA’s mobage network does, Facebook has over 800 million mobile users.

In the past, Facebook has proven they can make a game popular–at least for a short time. It’s up for the game developer to create a game that lasts. Given the Chaotic Evil alignment of modern game publishers, I’d much rather make this deal with Facebook* than with one of them.

* Oh, I’d take this deal with Twitter too. They’ve been able to get Vine to the top of the App Store charts all year. Imagine what they could do if they published mobile games!

Native Code is Dead

Although Android has a larger market share when you count it by pure number of devices and users, iOS still dominates monetization. Research I did earlier this year about apathetic Android users still rings true. However, vast improvements in Android as an OS and Google Play as a way to monetize apps are changing this. Not to mention changes to the new iOS 6 App Store are making app discovery even more difficult on Apple devices. A lot of developers are grumbling about their fortunes on iOS and are looking elsewhere.

Platforms are volatile. Five years ago, Facebook was the ultimate destination for game developers. Now it’s a ghost town. iOS is the hot ticket now, but Android is becoming increasingly competitive. As a developer you need to be prepared to move platforms in an instant. For this reason, native code is dead.

Using a solution such as Unity3D, Flash, or HTML5 allows you to easily move apps from one device to another. Or, from mobile to the Web. Or, from Web to desktop. You get the idea. It’s true that each one of these solutions has tradeoffs in features or performance to accomplish frictionless cross-platform porting. However, most studios can’t afford to double their engineering staff to multiply the amount of platforms they deploy on.

If you’re starting a new project from scratch, you have to consider your cross-platform options:


As one of the (very few) detractors said of my recent GDCO 2012 presentation on Unity3D: “This guy was a bigger Unity fan-boy than the company would have been.” It’s true! I am a self-declared Unity3D zealot. My experience moving between platforms has been incredibly easy. You can check this older post on the process I went through to bring Brick Buddies to Android. Unity3D has issues, but it’s the best solution I’ve found yet.


I’ve not used Corona myself, but did research it a bit when deciding which platform to hang my hat on. I know other developers who have created very successful apps with it. The major drawbacks are it uses Lua as its scripting language and it still doesn’t allow native code extensions. Yeah, I know I said native was dead–but not totally dead. I occasionally have to write native code plug-ins for Unity3D to access parts of a platform’s API that aren’t abstracted in Unity itself. This is a critical feature. Also, Corona can’t be used on the web or desktop platforms.


Flash has a tragic branding problem. The declaration of mobile Flash’s death doesn’t mean Flash is dead on mobile. This means the browser plug-in on Android is defunct. Good riddance. Flash made the mobile browsing experience on Android unusable.

Adobe has stepped their game up with Flash’s iOS and Android exporters. The packager allows Flash projects to be exported as apps on the target device. Flash’s CS5 exporter was atrocious, but I’ve seen some impressive work with the latest version. Flash even supports native code extensions. Adobe’s extortionate demands for revenue share mean Flash is out of the running for me if I intend to use their more advanced features. Otherwise, it is a superior option over Corona.


For game development, HTML5 is insane. If you really want to give it a shot, there are some relatively performant libraries such as impact.js that might help you out. I don’t recommend it. HTML5 isn’t much of a standard, needing a lot of workarounds for various browsers. Not to mention its horrible performance on mobile browsers. You just can’t win.

For non-game GUI-based apps (like Yelp or Evernote) HTML5 makes a lot of sense. PhoneGap/Cordova makes this possible by providing a framework for running HTML5/CSS/JS based applications inside a mobile web view and packaged as a native app. Coming from a native code background, constructing interfaces in HTML5/CSS seems absolutely insane. Friends don’t let friends write HTML/CSS. It should remain purely the output of tools such as Handheld Designer. HTML/CSS is becoming the Assembly Language of the web–it’s good to know, but hopefully you’ll never have to touch it.


There are plenty of other options I haven’t mentioned: Moai, Marmalade, Titanium Studio, UDK, and the list goes on. The important thing is to research your platform independent option and find what’s best for you. For games, I’m biased towards Unity–but other options are just as valid…I guess. Obviously there are applications for which native code will always be the solution. Yet, for the incredible glut of dying console game studios “pivoting to mobile,” this is an increasingly remote option.

Kakao is the new Asian mobile gaming powerhouse

Kakao has leveraged their insanely popular mobile group messaging app, Kakao Talk, to launch a social gaming network called Game Center in Korea. This is similar to Tencent’s strategy of using their Chinese instant messaging network, QQ, to drive traffic to f2p PC games. Yet in the West, Apple’s iMessage seems to have killed off most group messaging startups, and the only one to pursue a gaming strategy released a tower defense game based on Shannon Tweed. No, really.

Kakao has successfully commissioned established game developers to produce high quality games for Game Center. The slickly produced Match-3 game, Anipang, recently rose to the top of the Korean App Store due to its use of Kakao Talk as a viral messaging channel. (It’s also available for Android) Encouraging users to message friends in order to get extra plays, Anipang uses social news update notifications similar to the early days of Facebook games to drive reach. Korean friends of mine have deleted the app from their iPhones to avoid the onslaught of game messages–reminiscent of the bad old days of “Lost Sheep” Farmville spam. Regardless, Kakao has mined a passionate and highly monetizable social network of gamers from Kakao Talk.

With over 55 million users, Kakao may eclipse the size of DeNA’s Mobage platform. It remains to be seen what their plans for the US are. Although Game Center will probably have to be renamed before it launches in the West. I hear Apple can be quite litigious when it comes to their intellectual property.

Come to my session next week at Austin GDC

By the way…On Wednesday, October 10th at 5:35 PM at Austin GDC come see my talk on cross-platform Unity3D mobile games development. Hey, it’s only 25 minutes long. How bad can it be?

Android Users Are Apathetic

I launched the virtual pets spoof, Brick Buddies, on Android and iOS last month with zero PR. It was a crazy idea I wanted to make for no particular reason. Since both versions were launched with the same minimal PR effort (a mere tweet and a Facebook post), I figured I’d use this as an opportunity to analyze both platforms from a new perspective.

The top line: Brick Buddies on iOS gets 10X the downloads of the Android version. I got more iOS downloads in the first day than I did in 3 weeks on Google Play. Although both versions have earned a pittance, iOS users spend more money too.

Brick Buddies’ iOS release got picked up as a news story on at least 3 websites, including The Guardian, with no PR. I saw far more Facebook likes, shares, and retweets about Brick Buddies on iOS through my social graph than the Android release.

But wait, isn’t Android beating iOS in market share?

Pondering this, I thought about everyone I know that has an Android phone. They are my friends least into mobile tech. When I get a peek at their home screen, they hardly have any apps installed. They are seemingly content to have a slick-looking phone with a giant screen that makes calls and sends messages. iPhone users (myself included) appear to be platform zealots and voracious consumers of apps.

I had a hunch that most Android users just aren’t into their phones–which makes sense. If you aren’t into mobile tech, you’d probably settle for an Android device. Let’s face it–Aside from the Google ‘pure’ handsets, most really aren’t so great.

I put a survey up on Mechanical Turk to unscientifically poll the public about the habits of iPhone and Android users. I wanted to see how they like their phones and how excited they are about apps. I only got about 200 responses, so this really isn’t statistically significant.

Hey–it’s good fodder for an inflammatory linkbait post about Android users! Here are some results:


Both Android and iOS had the same ratio of men to women users.

My results supported what I’ve heard from other studies–Android users trend younger than on the iPhone. 60.6% of Android users polled were under 29 as opposed to 47.3% of iPhone users.

Android users trend younger than iPhone

Android users also reported lower incomes and education levels than iPhone users. Not that this is relevant information–Unless you are an Instagram snob.


When asked if they would buy the same kind of phone again, 89.3% of iPhone users said yes, while 78.9% of Android users did. Android owners also seem a little less satisfied with their phone when asked–89.2% of iPhone users were satisfied or extremely satisfied with their devices versus 81.7% for Android.


A chart showing the app recommendation habits of iPhone and Android users.

Android users seem less likely to blab about apps to their friends.

Android users seem slightly less likely to recommend apps to friends, with 37.5% of iPhone users recommending apps to friends often or extremely often and only 19.7% for Android. Hey, Android users just aren’t into apps–why talk about them?

Nearly 43% of iPhone users reported using apps extremely often, compared to 31% of Android owners.


Android vs. iPhone users: Have you paid for an app?

iPhone users pay for apps, Android users don't.

Although the vast majority of Android and iPhone users have downloaded free apps, only 47.5% of Android users have ever paid to download an app vs. 80.4% of iPhone users. Also, 77.5% of Android users reported never having made an in app purchase in a freemium game versus 58.9% of iPhone owners. Hey, it’s been said before.


This data is based on too small a sample to really make a conclusion. I still think it’s decent data to expand on my hunch–Android users just aren’t into apps. This presents a marketing challenge. Android users are out there, but how do you get them excited about your content?

According to this final chart, users of both platforms look for information about apps in similar places.

Info sources for new apps ranked by popularity for Android and iPhone users

Android and iPhone users have similar tastes as far as info sources for new apps.

The audience exists. Perhaps you have to address them differently in the same channels.

Some developers seemed to have cracked this code. For most, monetizing apathetic Android users remains a challenge.