Thursday, March 1, 2012

Choosing a mobile framework: Investigating Marmalade SDK

This is a follow-up for Choosing mobile dev platform/framework and looks closer at the ninth step -  Investigating each framework. Here we look at (Made with) Marmalade SDK. I'll go through each of the steps from the common post for all the frameworks.

Is it easy to get started?
As expected, Marmalde should have you up and running in no-time.
Register an account.
Register for a free trial
Download SDK
Open the example project, compile, run simulator. All working within a couple of minutes after download. Note: I already had MS Visual Studio 2008 installed. (

Is it easy to extend the library?
It's quite easy to extend Marmalade through the Marmalade EDK, it's documented enough to get you started, and after an initial attempt to write an simple extension on Windows it was easier than I suspected. I'm guessing it's quite the same for other platforms. There's also a video going through the steps for android and ios.

Features I need for my project
Drag and Drop
Reading from the documentation, what is needed is a combination of S3E Pointer as well as graphics. This is basically what I assumed before looking at the framework, as the framework is pretty "raw" in concepts.

Text to Speech
Must be implemented through an extension.

Basic image manipulation
Marmalade provides two apis for handling graphics Iw2D and IwGx. Both seems quite capable of graphics manipulation, although I had to dig further to find details about image manipulation (docs here). It only documents how to load an image. I do find it somewhat easier to load and work with images through Iw2D. If you are doing 2d games, it might be a good idea to look at IwGame Engine (drmop.com). It leverages sprite and graphics stuff and makes it a bit easier (and most likely faster) to develop 2d programs for Marmalade.

Basic access to camera
All done through S3E Camera capture. Quite simple and easy to use. It is in Beta at the moment, but it seems to work quite well. (documentation here)

Drawing/painting
Can be done through Iw2D, IwGX or directly using openGL. IwGame Engine makes 2d drawing a bit easier, although all require quite some work to do what you want. There's also a lot of plugins in the marmalade git repository (github.com/marmalade/). For sprites it might be worth looking at iw2dSprite.

JSON support
None. Since JSON is provided in C, it's a breeze to implement it within Marmalade which already compiles C/C++.

HTTP(S)-request support
IwHTTP handles both and is quite straightforward. You probably want to wrap it in a class to handle your data and server connections, but it's quite capable.

Custom user interface placement and user interface elements
Since marmalade is mostly hardcore drawing using one of the drawing interfaces, this is one of the areas Marmalade is strong. And since it recently implements UI Builder + native UI, you can even combine them.

Audio playback (simple)
Done through S3E Audio. Simple and straight forward sound playback of mp3, wav etc. Usually limited by what the platform supports. For streaming audio, S3E Sound can be used. It streams raw audio directly. There is a warning on using both simultaneously, as the platform usually has limits on how many tracks it handles.

Deployment to supported platforms
There are quite a few steps for each platform, so you probably want to script things up if you are updating your apps on a frequent basis, however, many of the steps are one-off per application, so it's not that much work. Read more in the platform guides,

Pricing
Free trial/non-commercial. $199 for standard licencse, which gives you a marmalade splash-screen on your apps or pro at $499. both is per seat, per year. Neither expensive nor cheap. You can also get the entire sdk for free for commercial use by applying to thier apps program. If you are unsure on how popular your app will become, go for the apps program, as you might be lucky that it takes off because of other apps distributed through the apps program. However, you get 80% after the store owner has taken their cut. Example: for a $1 app, you get 56 cent. 0,14 to marmalade and 0,30 to the store owner (apple or google that have 70/30 split).

Direct access to APIs
Through EDK, so that's fine.

Programming Language
C/C++, code is compiled and run through a VM. Would most likely give close to native speed. Seems to wrap up openGL on each platform as well as a few other apis into common api.

Documentation
Plenty of documentation, although it's not really that well organized. You are likely to find documentation for every bit and piece of Marmalade, but

Supported platforms
Now this one is a big plus for Marmalade!
Supported platforms under support agreement:
  • iOS (3.0 and above)
  • Android (1.5 and above)
  • Symbian (Symbian^3 and S60 5th Edition)
  • bada (all versions)
Beta supported platforms (Not under support agreement)
  • LG TV
  • BlackBerry Tablet OS
  • Windows desktop (full-screen and windowed applications)
  • OSX desktop (full-screen and windowed applications)
  • Windows Mobile 6.x
  • Symbian S60 3rd Edition
  • Mobile Linux, generic implementation
Quite an impressive number of supported platforms for being able to write native performance apps. 

Other features
Code Community
Code community with some libraries/plugins etc: www.madewithmarmalade.com/devnet/code-community /
The community is found on github here: github.com/marmalade

Summary
There is a learning curve to the platform as the API is quite basic. It's a low level framework to give you a common low-level api for multiple platforms. If you are writing a lot of 2d games, you probably want to add a 2d game library on top of Marmalade. Since there are tons of pure c/c++ libraries out there, you should be able to easily incorporate e.g Box2D and similar libraries to make development faster and easier. If you are used to writing everything from scratch, Marmalade offers a lot of flexibility. Comparing the price to the list of features and supported platforms, I would say you get a lot for every penny. However, this is not the library for you if you want a complete ready-to-go game engine or app engine. You have to be prepared to write a lot of the basics from scratch, which you might get directly in other frameworks.

Update 02/03-12: Added other features
Update 03/03-12: Added information about supported platforms,  programming language, documentation and overall summary.