UPDATE: Read here about my second game Monstaaa! made on Windows using Marmalade SDK.
When I started indie game development 6 months ago (see my previous post Good bye Blue Tongue (and time for indie game development)) I knew I wanted to experiment with games for iOS and Android. I knew nothing about mobile development at that time but I was kind of hoping there would be ways to develop my apps cross-platform (iOS, Android and possibly other platforms as well). And I wasn’t very keen to invest into a Mac just so I could develop for iOS. That’s when I started my investigation of available solutions.
In this post I’m going to give you a quick run down of my findings when it comes to available software / SDKs for cross-platform mobile development (mostly iOS and Android) under Windows. As part of that I’m also going to compare 3 different SDKs: DragonFire SDK, Marmalade SDK and Unity3D.
The first thing I came across while searching for ways to develop for iOS from Windows was DragonFire SDK. It’s iOS only but it’s cheap. You develop on windows under Visual Studio and test in their simulator. And if you want to test it on the iPhone or iPad you send them (via their website) your full source code and game assets (images, sound and all other data files) and they send you back compiled binary. What I initially liked about DragonFire SDK was that it had extremely simple C-style API – just one header file with a hundred or so functions for graphics, input, files, audio etc. Everything looked pretty straightforward.
I purchased the cheapest, $50 iPhone only, license and started experimenting. I set myself a goal of making simple sokoban game as quickly as possible, just so I could test that the SDK really does the job. The game was ready in about 5 days and run very well in the simulator. There were few problems and some bugs with rendering that I had to make workarounds for but finally all worked. Now I wanted to test it on my iPad and that’s where the problems started piling up (or become more obvious).
Firstly, it turned out that the whole source code has to fit in a single CPP file. Wow. Being curious what other people do I searched their forums and found community project that merges all CPP and H files into single CPP. Worked for me. Checked.
I paid another $50 for “ultimate iPhone” license meaning I could now test the game on the device. I packaged my build and sent to DragonFire, so they would compile the project for me. A day later I got my .app (iOS application) file and tried to install it on my device. No luck. The build wouldn’t install complaining about some incompatible configuration. I could investigate more, send question to DragonFire support or ask on the forums but there were also few other problems and all that together already made me quite uncomfortable about using DragonFire SDK. That’s when I slowly started looking around in search for other solutions out there…
In the end I haven’t even gotten to the point of getting my game to run on the iPad via DragonFire SDK. I quickly realized DragonFire SDK was not the right choice for me, and it wasn’t so for just one reason. Below my quick summary of mentioned SDK:
Cons (cons first because more important):
- extremely limited API (e.g. can only draw rectangles, no polygons; no support for “fancy” stuff like iOS GameCenter)
- buggy rendering code (at least in the simulator)
- all apps are fixed to 30 frames per second
- the whole source code has to be in a single CPP file
- assets once loaded stay in memory forever (sure, why would you ever want to free up some memory?)
- can’t make iOS build on Windows + terrible turnaround times (need to send them your source code + assets, then wait for reply; took 1 day in my case)
- terribly slow PC simulator (couldn’t even get 30 fps for my sokoban game; and I do have reasonably fast laptop)
- iOS only
- no debugging on the device (this one is pretty obvious but just wanted to make things clear)
- cheap ($100 for iPhone or iPad license; $150 for both)
- compiles to native ARM code (meaning no emulation -> fast)
- extremely simple API
- can develop on PC under Visual Studio
- can submit to Apple Store without Mac
My final word is: even if you’re not serious about iOS development, you better stay away from it.
The next thing I started looking at was Marmalade SDK. They had completely free 90 day trial, their API seemed way more complete than the one from DragonFire SDK yet simple and very clean. And they seemed to have pretty large and lively community. Also, knowing that games such as To-Fu (one of my favorites on the Apple Store) have been made using Marmalade SDK was very encouraging.
The next day my game was already running in the Marmalade simulator on Windows. And after one more day it was running on my iPad too. One great thing about Marmalade building process is that you don’t need Mac to make iOS build, you can do it right on your PC (Windows), locally. They do however also support building from Mac.
Few more days and I also had my game running on Android and Blackberry PlayBook. Since Marmalade is based on C++, it does support wide range of devices including ones supporting ARM (e.g. iOS, Android), MIPS (e.g. LG Smart TV) and X86 (e.g. Windows) architectures. Depending on the target architecture they just use different C++ compilers. The good thing about this is that the code you write runs natively on the device which means it’s as fast as possible.
I still plan to make a short post-mortem of the development of my game in a separate post, so I won’t go into too much detail here but I wanted to say that Marmalade was really a great choice for me. And the proof for that was that my sokoban game has been successfully released on iOS, Android and Blackberry PlayBook (check out Puzzled Rabbit).
Now, here’s my full summary of Marmalade SDK:
- still pretty cheap: standard license (without Marmalade logo at startup) is $500 which gives you access to all SDK features
- great (mostly) C style API: simple, clean & flexible (e.g. if you want, you can use OpenGL ES directly; or, if you prefer, you can use their higher level IwGx rendering API)
- powerful: built-in support for so many different things (e.g. Game Center, camera, photo gallery, HTTP)
- compiles to native ARM / MIPS / X86 code (meaning no emulation -> fast)
- supports mixing with native code (e.g. Objective-C on iOS or Java on Android) to create custom extensions that do whatever you want
- great open-source community projects: lots of goodness there including ports of very many popular C/C++ libraries (see full list here)
- can develop on PC under Visual Studio or on Mac under XCode
- can build iOS apps on Windows
- very good PC/Mac simulator
- support for native iOS builds on Mac (so, it’s possible to debug the code!)
- support for many platforms (including iOS, Android and less popular ones such as Blackberry PlayBook, Bada, WebOS or Symbian)
- support for asset pipelines: fonts, compressed textures, materials, models, animations
- occasional bugs in the SDK (fortunately they do try to help you via support or forums – though sometimes it does takes a while)
- some issues haven’t been fixed for surprisingly long periods of time, e.g. correct splashscreen handling on various devices has been broken for months!
- not all new features get added quickly (for example iCloud support isn’t good at the time of writing this, e.g. has no support for conflict resolution)
- can’t submit to Apple Store without Mac (not a big deal though; took 5 mins on my friend’s Mac)
My final word is: Marmalade SDK is truly great piece of software. It is very well designed and it does the job even though it has some (minor) issues.
I should also mention that for the last 5 months I’ve been developing my next, much larger and more sophisticated Marmalade based, game for iOS and Android and it’s been going really great. I was able to integrate lots of (3rd party) libraries and technologies including Game Center, Open Feint, Facebook, Box2D, camera, photo gallery or jpeglib. I wasn’t able to add support for iCloud yet because of limited support for that in Marmalade but thanks to support for native extensions I still plan to implement it (though, yes, I’ll need a Mac/XCode for that).
I have no experience with Unity3D, so I can’t say too much here. It definitely seems to be a solid piece of software and there’s been tons of projects released on iOS and Android that were using it which is a good thing. In fact 90% of my indie dev friends are using it, so I do very often get a chance to learn about it from what they tell me.
But there’s few things which, when compared to Marmalade, I didn’t really like. These also were my reasons for choosing Marmalade rather than Unity3D:
- emulation from (managed) C# via mono (meaning higher memory usage and worse performance; also garbage collection seems to be causing performance issues / frame rate spikes for some developers)
- more expensive: license for iOS and Android without Unity3D logo at startup costs $2300 ($1500 for Unity Pro + $400 for iOS + $400 for Android); more advanced features cost you additional $1500-$400 for iOS and $1500-$400 for Android
- additional functionality (via plugins) might cost you another couple $$$ (e.g. audio recording, Game Center, GPS – see here)
- high level & complex object oriented code you have to deal with
- iOS and Android only (well, this isn’t that big limitation but still)
- need to have Mac to deploy to iOS device
The only advantage of Unity3D over Marmalade that I know of is that it has nice 3D scene editors and other tools. Depending on what kind of game you’re making this might be a bonus.
If I missed something important while comparing Marmalade with Unity3D then simply let me know and I’ll try to fix that.
Now going back to finishing up my upcoming, still unannounced, game. Expect some news about it really soon!