There comes a time in every XBLIG developer’s life when they ask themselves, “How can I put this”

“onto one of these?”

This year, I want to hit more platforms than just the Xbox LIVE Indie Games market. My first priority is PC, specifically Windows. In this context, XNA is fantastic. I basically get a Windows build of my games for very little effort (some resolution management and key binding support). But what about OSX and Linux? The Humble Bundle (and the feedback I’ve received) has shown that these are non-trivial segments of gamers.

And then there’s mobile. Even I own a smart phone now, so that means pretty much everybody has one.

So if I’m going to go through the trouble of porting, I figure I might as well shoot for the stars and try to hit as many platforms as possible.

Of course, XNA doesn’t “just work” on these platforms. Porting XNA games has been done before by developers like Radian Games (Super Crossfire) and Fun Infused Games (Hypership Out of Control iOS), so it’s not completely foreign territory. Here’s a quick look at my current thinking:

Goal: Port DLC Quest to as many of the following as possible: iOS, OSX, Android, Linux

Approach #1: Native iOS Port

Rewrite the game from scratch for iOS.

  • Pros:
    • Free (other than iOS publishing fee, but all approaches will include this)
    • Potential for good/great performance, as this is as close to the metal as I can get
    • Learn a lot
  • Cons:
    • Most work. Total rewrite.
    • Have to learn Objective-C
    • Doesn’t directly allow for publishing on Android or Linux
    • Not sure how to port to OSX either

Thoughts: This is the most work, to hit only some platforms. But there’s no “magic” – I would know how everything works.

Approach #2: Port to Cocos2D or similar engine

Rewrite the game using Cocos2D as a base.

  • Pros:
    • Free
    • Save considerable time rewriting engine
    • Works on iOS and OSX
  • Cons:
    • Have to learn Cocos2D engine
    • Still have to rewrite game in Objective-C
    • Still does not directly publish to Android or Linux

Thoughts: Similar to above, but cuts out considerable engine work. But I already have an engine anyway.

Approach #3: Convert using ExEn, MonoGame, etc.

Use a MonoTouch based library/framework to do the heavy lifting and keep my codebase mostly intact.

  • Pros:
    • Use existing codebase, kinda (game needs adapting for touch devices/screens anyway)
    • Might be easier to maintain multiple versions in one solution
    • Write in C#
  • Cons:
    • $400 for MonoTouch (and an additional $400 for Mono for Android)
    • Does not directly publish to OSX orLinux
      • Whoops, apparently OSX is supported. Wizorb also managed a Linux version, so that’s a ‘maybe’.
    • Likely won’t work perfectly, require learning how MonoGame works to fix it

Thoughts: This feels like a magic bullet approach. I’m wary of things not working perfectly and then having to grapple with an unknown technology to try to fix it.

Approach #4: Unity

Re-write the game with Unity and reap the multiplatform benefits.

  • Pros:
    • Write once, hit iOS, Mac, Android, Flash. Possibly even Linux soon.
    • Get experience with Unity, which seems like a sensible business choice
    • Write in C#
    • Can potentially reuse some code
  • Cons:
    • Need to rewrite at least some of the game
    • $400 each for iOS and Android publishing. Potentially $1500 for Unity Pro + $1500/iOS/Android if needed.
    • Large learning curve for the “Unity way” of doing things
    • Likely have to invest in SpriteManager or similar library
    • Basically magic

Thoughts: Unity seems to make the most sense, but I’m also reluctant to use it because it feels like I give up too much control.

And the winner is…

Looking at this (and having slept on it), it seems like all signs point to Unity as the way forward. I’m not a big fan of the “magic” involved with Unity but that’s likely largely attributable to a lack of understanding. I’ll give it a shot and see if my reluctance is warranted or not.

I think the last time I used a Mac for more than 5 minutes was with an iMac in computer class over a decade ago. This oughta be interesting.

You said it dog.


About Ben Kane
I'm a game developer with a heart of gold.

7 Responses to Meta-Platforming

  1. I think Mono + Monogame might be the best answer, just because it’s less work, even with any tweaking you’ll need to do. You can grab the MonoTouch evaluation version, and get something running in the iOS simulator before spending any money.

    I’m not a fan of using Unity for 2d. It definitely works, I just don’t like the workflow, and there are lots of little gotchas you’ll have to work though.

    If you decide to go to the metal on iOS, there’s no need to learn Obj-C. You can do nearly all of the work in C++. The framework I wrote to port Hypership to iOS for Kris is open source, and you’re welcome to it. In theory, since it’s in C++ this should be portable to the Android NDK, but I decided that developing directly on Android is gross, and I’m playing around with Mono, myself.

    No matter which way you go, I wish you luck. 🙂

    • Ben Kane says:

      From my limited experience playing with Unity, I think the workflow is going to be the biggest hurdle. Doing things “the Unity way” feels pretty unnatural to me. Maybe that will change. It’s also pretty frustrating that it’s difficult to find good tutorials for Unity because everything is so visual. The video tutorials can be downright maddening when it comes to pacing.

      Mono + MonoGame is probably worth looking into, if only because the Wizorb devs seem to have come out of nowhere with a Mac port using it. I guess I wrote it off largely because I don’t really understand how it works. I think I’ll do a bit more reading up on it.

  2. Riolis says:

    Another option for approach #2 : cocos2d-x

    Still have to rewrite game in Objective-C – solved(kindda), it’s in c++
    Still does not directly publish to Android or Linux – solved, can port to ios, android, bada, win32, linux, and blackberry pretty much easily.

    You will still have to learn cocos2d engine tho. Not that hard fortunately IMO.

    • Ben Kane says:

      Yep, I looked into that a bit and there do appear to be quite a few useful Cocos2D variants. I guess my reluctance here is that I already have an engine, so if I’m going to rewrite it I’d rather it be in something like Unity where I can at least salvage some pieces of it. Having said that, Cocos2D-x is probably where I’d start for a new 2D game targeting mobile.

  3. profexorgeek says:

    I have been using FlatRedBall (FRB hereafter) for about a year now, developing games as a hobby. I did a fair amount of vanilla XNA before and really like the balance of abstraction and flexibility FRB provides. Additionally it is free, and currently supports PC, WP7 and Xbox. They are actively working on an Android build atop Mono.

    I released a game called Whirlygig: Aegis for WP7 using FRB. It was originally built for xbox but I changed my mind and ported much of what I had to WP7. Professionally I’m developing an eCommerce app for a major retailer for Android using Mono and have been very pleased to be able to use C# and target Android.

    I have no experience with MonoGame or anything iOS but if you want details on any of my experiences with FlatRedBall, porting from xbox to mobile or MonoDroid development in general, feel free to hit me on twitter: @profexorgeek

  4. juan says:

    i think that monogame could be the best option

  5. Andy Dent says:

    I am approaching from the other direction, having a game design I started implementing in Cocos2D for iOS then got a bit panicky about other platforms, before having gone too far down the learning curve. I’m trying MonoGame and MonoTouch right now (30 days no-questions-asked cash back tempted me into buying it so I can see the results on the device). One of my bigger sources of angst is the chance that this is all wasted if WP8 is basically Win8 on phones – I may as well have stuck with C++.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: