Hello Marmalade – Introduction to the Marmalade SDK – The ultimate cross platform SDK for smart phones and tablets

This tutorial is part of the Marmalade SDK tutorials collection. To see the tutorials index click here

So you are a smart phone, tablet, smart TV or desktop developer (or at least want to be) and you want to have your next hit game or app run across a huge range of smart phones and tablets. Well, you have come to the right place to find out how to do just that.

No matter whether you are a professional games developer, part time hobbyist coder or the technical director of a large corporation researching how to support you work force across a huge range of varied phones and tablets, the basic principles remain the same. By choosing to develop your products across multiple platforms:

  • You benefit from a much wider audience for your apps and games
  • You save a lot of money and time on development, testing and updating
  • You can perform updates to your existing apps quickly and easily
  • You can share the same unified C / C++ code base across all devices and platforms
  • No need to learn (or hire professionals that know) multiple languages, UI’s or SDK’s
  • Regularly updated SDK with new platforms and features
  • Some of the smaller app stores offer increased visibility and more stable long term sales

And by choosing the Marmalade SDK you also get:

  • A FREE license/li>
  • Amazing support, including the apps program and device loan program to aid testing
  • A simulator that lets you test across an unlimited set of screen resolutions and simulated access to Accelerometer, GPS, Camera, Audio, Multi-touch screen, SMS, Compass and more
  • Test actual ARM code without even deploying to an ARM based device
  • Support for iOS specific features such as App Store Billing, iAd, Game Center etc..
  • Support for Android specific features such as Android Market Billing
  • Access to a large collection of open API’s such as Box2D, AdMob, Flurry, Chipmunk,SVG, Python, LUA and tonnes of other cool stuff (Full list available at http://github.com/marmalade)

Marmalade is also partnered with the likes of Shiva3D, Scoreloop, Tapjoy, Raknet and many others, so you know this is an SDK that’s here to stay

Ok so what platforms does Marmalade actually support? The list to date is as follows:

  • iPhone, iPod Touch and iPad
  • Android
  • Blackberry Playbook
  • Blackberry 10
  • Windows
  • Windows Phone 8
  • OSX
  • Tizen
  • Roku

I know what you are thinking, can I really write my code once and run it across all of these platforms? The straight answer is “absolutely!” as we at Pocketeers have proven. We have already released BattleBallz Chaos (Arcade action game) across iOS, Android, Bada and Blackberry Playbook using the Marmalade SDK, as well as Funky Cam 3D (a fun photography app) across iOS, Android and Bada.

Ok, so if you can write your code once and deploy to so many platforms then why is your BattleBallz Chaos not available on the likes of Symbian or webOS? The simple answer is that some of those platform markets are not currently where we want to go for a variety of reasons, but none of those reasons relate to the Marmalade SDK. We may choose to support them in the future and we may not.

Righty ho, you’ve decided that you quite like the sound of this Marmalade SDK and you’re considering saving yourself a boat load of time and money developing your cross platform games and apps, but what does code look like with this SDK?

Well here’s a basic game loop:

#include “IwGx.h”

int main()
{
    // Initialise Marmalade graphics system
    IwGxInit();

    // Main Game Loop
    while (!s3eDeviceCheckQuitRequest())
    {
        // Clear the screen and depth buffer
        IwGxClear(IW_GX_COLOUR_BUFFER_F | IW_GX_DEPTH_BUFFER_F);

        // Update my awesome game
        PleaseUpdateMyGame();

        // Render my awesome games view
        RenderMyGameViewThankyou();

        // Flush graphics system
        IwGxFlush();

        // Display the rendered frame
        IwGxSwapBuffers();

        // Yield to the operating system
        s3eDeviceYield(0);
    }

    // Shut down Marmalade graphics system
    IwGxTerminate();

    return 0;
}

You will find that the graphical system in Marmalade is similar to Open GL, which for me makes the SDK very simple to use. All other sub systems are equally as easy to use for example:

To create a texture from a bitmap file and upload it to the GPU:

CIwTexture* texture = new CIwTexture();
texture->LoadFromFile(“AwesomeSpriteAtlas.png”)
texture->Upload();

As you can see the code is ultra simple and very easy to use but most of all “cross platform compatible!”. Imagine having to do this on iOS using XCode / Objective C and then again using Java on Android and then again using Flash on Playbook, the list goes on.

So unless you enjoy self punishment, lots of extra work and the pain of tracking the same bugs across multiple SDK’s, languages and platforms, I suggest you take a short trip over to Marmalade’s SDK home page at http://www.madewithmarmalade.com. Take a look at the SDK, its features, read some tutorials and even sneak a peek in the forums (I bite but not many of the other developers do!)

Over the coming weeks / months I will be writing a number of tutorials covering various aspects of the Marmalade SDK, associated tools and extensions, so keep an eye out.

Android Apps – The Hard Sell? – Comparison of Android App Stores Included

Selling your wares on the Android platform is what some would call “a waste of time” and to be honest I would be very tempted to agree with them. Why would this be the case you may ask? In this article I will attempt to answer that question as well as put forward a comparison of a number of Android app stores, so you know which are worth the effort and which are waste of your time.

In this article I am going to use our latest app “Funky Cam 3D” for Android phones and tablets (http://www.funkycam3d.co.uk) as a frame of reference.

Our company Pocketeers Limited (http://www.pocketeers.co.uk) released its latest Android app “Funky Cam 3D” across a number of Android app stores a few weeks ago. To date we have had a grand total of 14 sales, YES, you did read that right “14” sales. The very same app on iOS has sold 20x that amount in half the time and 10x as many on Samsung Bada in just 2 days

Ok, so we took the rather disappointing sales on the chin and came up with a cunning plan to get the app selling somehow. Our first idea was to drop the price to free for a few days in an attempt to increase the apps popularity with users. Unfortunately the Android Market does not allow developers to change an app from free to paid, which means as soon as a developer changes their app to free they cannot change it back to paid without deleting the app and re-launching it under a new name.

So as an alternative we decided to release a free ad-supported version of Funky Cam 3D. Going on how badly our app was selling we were surprised when many thousands of Android users downloaded our app across various app stores and directly from our web site.

Ok, now the “pain in the ass” bit. Submitting apps to the various app stores is a difficult and time consuming process, a process that will bring you close to tears. Each developer portal has its very own submissions system as well as required art work sizes and formats. Unlike when you submit an app to Apple for certification you find that you spend days on the task of submitting your apps information to the various app stores out there. Why not just submit the app to the Android Market you ask, surely the Android market would offer the greatest exposure? Maybe the following figures will clear this up:

Android Download Statistics for Funky Cam 3D

Our own web site – Over 15,000 downloads (we posted our APK link to various public forums and warez forums)
Appia – 3880 copies
Android Market – 2506 copies
SlideMe – 1198 copies
Mobiles24 – 701 copies
Mobango – 549 copies
Mikandi – 143 copies
AndroidPit – 134 copies
GetJar – 48 copies
Handster – 19 copies
Soc.io mall – 0 copies

As you can see from the above list we have some clear winners and some clear losers. Notable points:

* It would appear that one of the best ways to market free apps is from your own web site coupled with aggressive marketing.
* Appia actually beat the Android Market by a substantial margin, which surprised us. In case you are wondering Appia supply apps to various partners such as Handango, Pocketgear and Mobile2day
* SlideMe figures were a big surprise, we did not expect such figures from what we thought as a minor portal
* Our biggest surprise above all was how badly our app has performed on GetJar, which is supposedly one of the largest app distributors on the planet (we just have no explanation)
* Our greatest downloads came from warez forums. We expected a lot of downloads from this source but were knocked back by just how many we got

So above all else, what did we learn from our little Android app experiment? Well, we learnt that Android users don’t like to pay for apps but will download free apps in droves! A mentality we have coined “frap-mentality”. We also learnt that Ad supported apps do not offer a sufficient return even if downloaded in the 10’s of thousands. Our ad revenues are enough to pay for a cheap meal at the local public house (maybe a subject for a new blog)

If you are considering building a business around developing apps or gaming products for the Android platform then make sure that it is your 2nd choice of platform. Use a cross platform development system such as the Marmalade SDK (http://www.madewithmarmalade.com), this way you can re-target Android quite easily without significant investment in Java or the Android SDK.

You can download Funky Cam 3D from the Android market at:

Funky Cam 3D on the Android Market and
Free version of Funky Cam 3D on the Android Market for those that like shiny new Ads

Update 30th August 2011

Quick download figures update to this post:

Our own web site – Over 17,000 downloads (slowed substantially)
Appia – 13526 copies (massive increase)
Android Market – 4188 copies (pleasant increase)
Mobango – 2623 copies (huge jump)
SlideMe – 1503 copies (up 50%)
Mobiles24 – 942 copies (up a little)
AndroidPit – 214 copies (nearly doubled)
Mikandi – 174 copies (up a little)
GetJar – 154 copies (almost tripled but figures are still terrible)
Handster – 34 copies (good increase but still low figures)
Soc.io mall – 0 copies (Hmm, are these guys alive?)

Update 9th October 2011

Quick download figures update to this post:

Appia – 73665 downloads (massive increase)
Our own web site – 22,000 (slowed considerably)
SlideMe – 12306 downloads (massive increase)
Android Market – 11070 downloads (huge increase)
Mobango – 5042 downloads (good increase)
AndroidFreeware – 3189 downloads (new addition)
1Mobile – 1955 downloads (new addition)
Mobiles24 – 1673 downloads (respectable increase)
AndroidPit – 441 downloads (nearly doubled)
GetJar – 366 downloads (good increase, but I thought that this app store was supposed to be the largest free app store out there?)
Mikandi – 274 downloads (up a little)
Handster – 96 downloads (good increase but still low figures)
Soc.io mall – 1 download (woohoo at last!)

Downloads have nearly doubled in most app Android stores , but some app stores are clearly flying ahead!

Update 16th October 2011

Another quick download figures update to this post:

Appia – 93014 downloads (no stopping Appia)
Our own web site – 22,000 (stopped tracking, its too much effort)
SlideMe – 14260 downloads (slight jump)
Android Market – 12233 downloads (slight jump)
Mobango – 5109 downloads (slight increase)
AndroidFreeware – 3317 downloads (slight increase)
1Mobile – 1955 downloads
Mobiles24 – 1770 downloads (slight increase)
AndroidPit – 473 downloads (slight increase)
GetJar – 400 downloads (up a bit)
Mikandi – 284 downloads (up a little)
Amazon App Store – 128 downloads over 2-3 months (This is the paid version but Amazon have had it free that long it counts as free for this article)
Handster – 103 downloads (tiny increase but still low figures)
Fasmicro – 34 downloads (new addition, around 2 months data)
Appoke – 2 downloads (new addition, live 6 days)
Mobireach – 2 download (new addition, 4 weeks data)
Soc.io mall – 2 downloads (we got another download :))
CNET – 1 download (new addition, 5 weeks of data)

Update 6th November 2011

Another quick download figures update to this post:

Appia –  148390 downloads
SlideMe – 20286 downloads
Android Market – 15276 downloads
Mobango – 5393 downloads
AndroidFreeware – 3616 downloads
1Mobile – Removed as 1Mobile no longer show download stats
Mobiles24 – 1975 downloads
GetJar – 724 downloads (in contrast one of our very old J2ME mobile game DEMOS  has been downloaded 3.759 times in the same period, making GetJar very much still a Java ME app store)
AndroidPit – 549 downloads
Mikandi – 312 downloads
Amazon App Store – 170 downloads
Handster – 126 downloads
Fasmicro – 38 downloads
Mobireach – 17 downloads
Appoke – 14 downloads
Soc.io mall – 8 downloads
CNET – 1 download

Other Android Developer Downloads / Sales Statistics

I will list here any other developers Android sales / downloads statistics that I come across:

Ziggys Android Download Statistics at ZIggy’s Games

If you would like a link to your Android download or even sales statistics posting here then let me know