Using Unity for non-game app development

I suspect that many other developers would disagree with me, but I have used the Unity 3D game engine to develop non-game apps (like Kiduoso – First Words) and have been very happy with the decision. This is my story of researching cross-platform mobile app frameworks and why I ultimately chose Unity as the foundation for Kiduoso.

First, here were my requirements for the framework I would use to develop Kiduoso:

  • FREE
  • Cross-platform iOS and Android (other platforms would be a bonus)
  • Gracefully handle different resolutions/aspect ratios
  • Must be able to do In-App Purchases
  • Drag-and-drop WYSIWYG UI designer (i.e. – not purely code-driven UI)
  • Ability to make calls to an arbitrary web service
  • Could store arbitrary files in the local file system
  • No online only requirement for dev – I knew a few frameworks that had an online IDE or online build process
  • Not quite required, but I really wanted to be able to test on PC w/o deploying to a device every time

Quick comment on the cross-platform piece – some people will say that the best way to make an app for different platforms is to develop multiple times, going native in each platform. I’m one guy trying to build some apps to help pay my bills. I need to take all the shortcuts I can. So, I refused to consider using the Android SDK (even though I had built an app using it in the past and knew it somewhat), or learning Objective C to do native iOS dev. I was determined to develop ONCE.

After a lot of research I found the following options for free cross-platform frameworks:

  • Unity – C#
  • Xamarin – C#
  • Kivy – Python
  • Titanium Appcelerator – Javascript
  • Sencha Touch – Javascript web app framework (using Cordova/Phonegap to get native functionality and compile into a native app)
  • Enyo – Javascript web app framework (using Cordova/Phonegap to get native functionality and compile into a native app)

Now, I had some biases going into this. I was biased toward Unity because I had spent the past 2 years working with it exclusively almost every day and knew it inside and out. I was also highly biased toward C#. I think it’s a great language and is maybe the best thing Microsoft has ever made. I was also biased against Javascript. Just not a fan.

My reservations about Unity were the battery drain, initial load time, package size, and the Unity splash (for non-Pro). I wasn’t concerned about UI design because I knew the latest NGUI could handle everything I wanted it to do and more.

As I continued to research and experiment with some of the other frameworks, here is why I eliminated each one:

  • Xamarin – limitation on size of compiled code in free version, no shared UI code (basically had to code UI twice), no easy IAP support on Android, no file I/O on Android
  • Kivy – no IDE/WYSYWIG for UI design, used OpenGL for rendering, seemed geared toward graphics heavy visualization type stuff, minimum Android APK size was 7 MB (not really any better than a minimum Unity APK). Seemed like no reason to use this over Unity.
  • Sencha Touch – would need separate HTML/CSS tool for UI design, Cordova had no real support for IAP, had the hardest time even getting a “Hello World” app going, required Ruby to be installed for some reason, had to run apps from a web server (no local testing), tested sample app on my Droid 4 and it was slower and less-responsive than Unity
  • Enyo – would need separate HTML/CSS tool for UI design, Cordova had no real support for IAP, I actually liked Enyo a lot but the lack of IAP killed it

Titanium was actually a close second. It had the WYSIWYG IDE. Minimum Android APK size was 1.5 MB (compared to about 8 MB for Unity). It could handle file I/O and IAPs via modules. It truly compiled down to native (unlike other web apps that just used Cordova as a wrapper to give the illusion of native). But in the end it just didn’t offer enough more than Unity could offer to make me pick it, especially since I already knew Unity. The IDE also seemed a little slow on machine and flaky (crashed a couple times). The load times on my Droid 4 were comparable to Unity. I really liked being able to debug Unity via Mono and I really disliked Javascript.

So, I went with Unity and haven’t looked back. The dev process has been painless. The community is great. The Asset Store is a lifesaver. Load time is only a second or two. Package size is large but not ridiculous. I figure most people won’t notice or care. I don’t see a battery drain issue. The app doesn’t even register on my table of top things causing battery drain (Android OS and display are still by far the highest).

I also get to reuse my code. I plan to continue making games and I can reuse some of the scripts I have created for this app.

And for the record, I think native UI standards are overrated. When I made my app in the Android SDK a few years ago I went strictly native for UI design. I wanted my app to look consistent with others. The thing I realized much later was that consistency doesn’t matter if nobody else is being consistent. If you look at any of the top apps on the Google Play you’ll find that nearly all of them use their own custom widgets/UI rather than “standard” Android stuff. If anything, I noticed that the “pros” and big companies designed their own UIs and the hobbyist devs used the standard stuff. So, if anything, I feel like using the standard UI can have a negative connotation of looking amateurish. Anyway, I think the ultimate key is making sure your UI is clean, intuitive, and good-looking… and you don’t need to go native to do that.

Comments

comments