Native Android/iOS development vs Marmalade SDK

33,816

Solution 1

I have used Marmalade/Airplay for almost two years now in my indie game company. For me it's a win because I'm just one programmer, and I can do virtually all my work in Windows using MS Dev Studio (which is my favorite dev environment by far) and because it shields me from having to deal with a lot of the platform-specific details, especially with the various development tools, that could eat up a lot of the time I'd rather spend on game content.

Speed will not be an issue with Marmalade. Your C++ code runs natively. Also, access to camera and other functionality should not be much of an issue; it's either already provided or can be added using the extensions SDK, which is pretty straightforward to use.

Marmalade is a mature product and the company is pretty helpful in resolving issues quickly, even for indie developers that are using the product for free. In addition to the cross-platform-ness, it has some nice tools built in, such as a memory leak tracker, a logging system, graphics analysis tools, and others.

There are some downsides that I've experienced with Marmalade.

  1. Even though in theory any API or third-party SDK is accessible through the extensions system, in practice the thing you need may not exist yet. As an example, a number of developers are currently struggling to get the analytics package Flurry integrated, and it's been a challenge for some. The situation is similar with lots of other third-party SDKs; they may be just a couple lines to integrate if you are doing Objective-C development, but can be more difficult via Marmalade.

  2. Some things are less natural because of the cross-platform layer through which you operate. Some examples for me have been:

    • I've had trouble getting my splash screens (application start-up screens) to display properly in all screen sizes on both iOS and Android. And it's been hard to get them to show without some flickering, short black-out periods, or resizing of images as it transitions between the device load of the Marmalade app itself, and then Marmalade's step of loading your app code.

    • Marmalade imposes a very simple memory model, where you get a fixed heap up front, and all memory allocation is done through Marmalade. From the system's point of view the app just has and keeps a big block (or a few big blocks) of memory. This has some advantages, but I've had problems squaring this model with the iOS model of, for instance, receiving memory warnings and being expected to jettison any unnecessary resources. It appears to be a case where "one size fits all" ends up actually losing some key functionality.

    • You can use the extension manager and some other methods to show native UI elements, but integrating a significant amount of native-look-and-feel UI can be a challenge. So if your app is game-like and users can deal with non-standard buttons and so on, that's fine, but if you anticipate needing significant native UI, it is harder. [edit: Recent versions of Marmalade have added a native UI framework that lets you specify standard UI elements in a generic way and then implements then using the appropriate widgets for the device. I have not used this, but it looks fairly comprehensive.]

  3. If you run into problems, it's often not clear whether it's a generic OS problem or a Marmalade problem, and it can be lonely trying to find help. For instance, I recently added in-app purchase to my game, on both iOS and Android. IAP is challenging, and even without an additional SDK layer there are lots of special cases to deal with. In my case, I had a situation where my app had been rejected by Apple for a small issue, and while it was in the rejected state my in-app purchase was also in a "rejected" state (even though there was nothing broken about the IAP itself; this is just a quirk of Apple's process). When I was trying to regression test the in-app purchase functionality (while I was submitting the fix for this non-in-app-purchase-related issue), the game was actually crashing, instead of getting an appropriate error result. I was able to determine that the crash wasn't in my game code, so it was either the OS (unlikely) or the Marmalade middle layer for handling the in-app purchase callbacks (which is what it turned out to be [update 11/28/2012: Marmalade has reportedly fixed this problem in a recent SDK update]).

    So in a situation like that you can try going on Stack Overflow to get help, but really nobody is there to help you, so you are dependent on the Marmalade team to get back to you with an answer. As I say, they do a pretty good job of this, but there's no way it can compete with nearly instantaneous responses on Stack Overflow from the world-wide community of regular iOS programmers. So I'd say this last one is my biggest concern with using a system like Marmalade. It saves you time up front not having to come up to speed on the details of the various platform SDKs, but when you run into problems you are "at the mercy" of the Marmalade team (or friendly Marmalade community members) to get back to you with an answer. (Keep in mind here that I'm writing as a freebie indie developer who just gets standard priority for issue resolution. You can pay to get guaranteed quick resolution.) For me personally, it's been hard having to keep coming back to my producer and saying "I'm waiting for an answer from the Marmalade guys on this one."

    (Another example of issue 3 is that until recently there was a problem with sound effects being delayed on certain Android devices. It was a Marmalade issue, and they did eventually resolve it, but it took a while, and there's basically nothing you can do in the meantime.)

Keep in mind that (as other responders have pointed out) even without Marmalade you can still have the bulk of your code base in C++ on either iOS or Android.

In spite of the long list of potential issues above, I am a fan of Marmalade, and I appreciate all the company has provided for me for free. The tool really shines when it comes to other platforms that you'd otherwise never bother with, such as (for me) bada or PlayBook. You really can deploy to a wide array of devices from the comfort of your PC and Developer Studio (or from a Mac with xcode, if you want to make your life a little harder ;). The simulator tool they have is great, and there have been only a small number of instances where I've had to debug on the device itself; in general if it works on the simulator it just works. IdeaWorks has taken on a huge challenge and they are doing a great job juggling all these features (i.e., basically every features ever offered on a mobile device) on all these platforms (i.e., all significant devices in existence, with the exception of Windows Phone 7 because it does not currently allow native code). It just comes with some caveats.

Solution 2

I am biased, being the CTO at Marmalade... but if your key requirements are (1) camera access and (2) the ability to "squeeze out every little bit of processing power available" then Marmalade is a great choice.

Marmalade compiles your C/C++ to native ARM (or x86) instructions... no transcoding, no virtual machines. It's very easy to bring across existing C/C++ code, nearly all the C/C++ standard libraries are supported, etc. And you can use ASM code within your project. Also, you can do all your development either on Windows or Mac, regardless of what platforms you deploy to (yes, you can even compile/test/deploy to iOS purely on Windws).

Solution 3

As far as I can tell you from ANDROID Development: The Camera API from Android itself seems to be a little buggy (in example: before 2.1 there is no solution to get Camera shown in portrait-mode without scrambling the Images). Another abstraction layer on top of that might be better (in terms of accessibility, features, whatever), or even more worse. What it does for shure: It steals resources, which may be needed for your own App.

Solution 4

Marmalade offers an excellent Native Extension framework

http://www.madewithmarmalade.com/marmalade/features/extensions-development-kit

WHich ultimately means that you can jump directly to a native implementation of any particular feature. You still keep the core benefits of cross platform development for your main app.

Also on android because marmalade makes use of the android NDK your c++ code for processing data will be running faster than the corresponding android Java code.

Im making games with Marmalade and the extensions and native code speed make me extremely confident of being able to deliver at least as well as a 'native' app.

Solution 5

I would use MoSync Android/iOS, but I would say that, since I work at MoSync.

But in all fairness I prefer the MoSync Camera API.

If you really want to squeeze out all the processing power out you should use ASM.

/Tony

Share:
33,816
Abai
Author by

Abai

Updated on October 02, 2020

Comments

  • Abai
    Abai over 3 years

    Our company is on the verge of picking between native Android/iPhone development and some cross-platform solution, specifically Marmalade SDK (former Airplay SDK).

    We are a computer vision company, meaning we need low level access to the camera devices. Also, our applications are computationally expensive, meaning we tend to squeeze out every little bit of processing power available.

    Our team has sufficient experience in both Objective-C and Java (or C) to provide platform specific solutions. However our main focus was always on C++, as such we would like to prevent fragmenting out team and rather work with a cross-platform solution.

    Our biggest fear is that choosing Marmalade will either sacrifice processing speed (main concern) or severely increase development time by complicating low level access to camera frame buffer.

    So my question is, besides the obvious, what are the advantages, but specifically limitations of Marmalade SDK for processor intensive video processing applications.

  • Abai
    Abai almost 13 years
    we indeed resort to some inline asm now and then
  • Abai
    Abai over 12 years
    Thanks so much for your elaborate answer. I definitely admire what Marmalade can currently do. Thanks to you I now also know what are the implications of using it within my company.
  • user413185
    user413185 over 12 years
    Just one question to Tim Closs: You said: "(yes, you can even compile/test/deploy to iOS purely on Windws)". Can I deploy my app to Apple on a Windows machine? Don´t I need a Mac to send the app to App Store? Thanks
  • M Katz
    M Katz over 12 years
    I can't answer officially for Marmalade, but yes the one thing I use my Mac for in the whole process is to actually submit the app using AppLoader. (AFAIK there is no AppLoader for Windows, but there is a good iPhone Configuration Utility for Windows.)
  • trickdev
    trickdev about 12 years
    Excellent answer, thanks for taking the time to give a proper objective experience.
  • ptdev
    ptdev almost 12 years
    If you use Marmalade's Camera Capture API (using the OS default photo app) you'll be OK. For more advanced usage you have the Camera API instead, but the indirection layer may limit what you can do in terms of native access to the camera; and especially (in my case) have a slow refresh rate for preview: in my Galaxy Nexus the NUI photo preview is noticeably slower than the native camera app. My strategy for this is to use Marmalade EDK to create a preview surface using the android java api, and send the images back to native code via a callback. Working OK for me, but it is extra work...
  • Lior
    Lior almost 12 years
    Tim, we love Marmalade and believe in its future. it has good performance and deep engineering tools surrounding it (we've actually contributed OpenCV to its git). But we have now concerns with intermittent app crashes when using the camera, and others are reporting the same. could you guys maybe dedicate efforts to solve this area? it is crucial to us and I believe to everyone. Some threads re issue: tinyurl.com/7mcd5y5 tinyurl.com/7apzx4y tinyurl.com/czklmr9
  • Costa
    Costa over 11 years
    Thanks for the detailed answer. Just wondering if any of your issues have improved/resolved since you last updated your answer?
  • M Katz
    M Katz over 11 years
    @Costa: Well, I'm kind of in a holding pattern, still using Marmalade. The most pressing issue for me had been the splash screen, and I've found a good-enough way to work with it. It still has a jump while loading on iPad, but otherwise is okay.
  • Akshita Kanojia
    Akshita Kanojia almost 11 years
    About your (2)(a) it's been hard to get them to show without some flickering or short black-out periods Marmalade has to load itself onto memory, and we can't avoid the black-out periods. I believe they can init the splash screen while loading itself but currently (v6.3.0) we have to see the black screen for at least 2.5 seconds (confirmed on their forum).
  • user2727765
    user2727765 over 10 years
    I need to do a simple face detection using Opencv. I have tried the Github code from here github.com/marmalade/MarmaladeCV. But I could take the control of frames that are captured from the camera. Can I get a simple example or a links for me to proceed with Marmalade SDK + Opencv.
  • register
    register over 9 years
    How could it be that it is possible to compile/test/deploy on windows without violating the Apple Developer SDK license/agreement? I understood that Apple explicitly forbids to distribute derivative work of its SDK on non-Apple operating systems. For this reason Xamarin uses a remote backend on a Mac machine to compile. How can Marmalade comply with Apple license? If everything is binay and not interpreted then there must a set of headers and libraries derivated from the ios SDK installed on Windows.
  • Shekhu
    Shekhu over 9 years
    @MKatz thanks for such detailed answer ;I really appreciate your time... Just wondering if any of your issues have improved/resolved as it's been over a year since the last update in your answer...
  • Kyll
    Kyll over 8 years
    Thank you for answering and contributing to Stack Overflow, however please take a second look at the question, for it seems to be off-topic according to the help center. Answering off-topic question make it look like it's okay to ask such questions - it's not. Off-topic questions might get closed and then deleted, which would nullify your contribution!