Funky Cam 3D Top Downloaded App for Bada on Samsung Apps


Funky Cam 3D Icon
Funky Cam 3D Icon

Yes, you read that right, we are pretty excited to announce that our Marmalade powered Samsung Bada app Funky Cam 3D FREE has just hit the No. 1 top spot on Samsung Apps. You can a grab a copy of our No. 1 Christmas hit at Funky Cam 3D on the Samsung App Store

Funky Cam 3D is also available on the following platforms:

* iPhone and iPad

* Android (also available on most other Android stores)

You can find out more about Funky Cam 3D at http://www.funkycam3d.co.uk

If you are interested to know how many downloads that equates to per day then the value is 3000-4000 downloads per day. Just goes to show the marketing power of Samsung’s Bada platform.

Marmalade SDK Bitesize Tutorial – How to Determine Device Operating System

Just though that I would sneak this quick bite sized tutorial in whilst taking a breather from documenting IwGame. Tell you something, I never realised just what a big beast IwGame has become.

Ok, I’m going to quickly cover how to determine which device operating system we are running on using the Marmalade SDK.

The Marmalade SDK has two neat little functions called s3eDeviceGetInt(s3eDeviceProperty property) and s3eDeviceGetString(s3eDeviceProperty property) which allow us to query details about the device that we are running our apps on. As the names suggest, one returns an integer value, whilst the other returns a human readable string value.

Using the property parameter you can query all sorts of things such as:

  • Device operating system (S3E_DEVICE_OS)
  • Device phone number (S3E_DEVICE_PHONE_NUMBER)
  • Device language (S3E_DEVICE_LANGUAGE)
  • Battery level (S3E_DEVICE_BATTERY_LEVEL)
  • Operating system version (S3E_DEVICE_OS_VERSION)
  • Floating point unit support (S3E_DEVICE_FPU)
  • Language- country code pair, e.g. en-us (S3E_DEVICE_LOCALE)
  • Device UDID / IMEI (S3E_DEVICE_UNIQUE_ID)

And all sorts of other useful info. Check 3seDevice.h for a comprehensive list of all properties that you can retrieve.

To find out which operating system you are running on you call:

int os = s3eDeviceGetInt(S3E_DEVICE_OS);

You can then test for which OS is running using a simple switch statement like this:

switch (os) { case S3E_OS_ID_SYMBIAN: break; case S3E_OS_ID_WINMOBILE: break; case S3E_OS_ID_WINCE: break; case S3E_OS_ID_QNX: break; case S3E_OS_ID_BADA: break; case S3E_OS_ID_ANDROID: break; case S3E_OS_ID_IPHONE: break; case S3E_OS_ID_WEBOS: break; case S3E_OS_ID_WINDOWS: break; case S3E_OS_ID_LINUX: break; case S3E_OS_ID_OSX: break; }

Android Sales / Downloads Figures Update for Funky Cam 3D (December 2011)

I’ve decided that I’m going to start running monthly updates on our sales / downloads figures for one of our Android product Funky Cam 3D.

Here are our latest download totals as of 11th December 2011 per Android App Store:

  1. Appia –  240140 downloads
  2. SlideMe – 34342 downloads
  3. Android Market – 21926 downloads
  4. Mobango – 5931 downloads
  5. AndroidFreeware – 5492 downloads
  6. Mobiles24 – 2178 downloads
  7. GetJar – 2015 downloads (picking up some good traction now)
  8. AndroidPit – 767 downloads
  9. Mikandi – 371 downloads
  10. Handster – 184 downloads
  11. Amazon App Store – 170 downloads
  12. Mobireach – 69 downloads
  13. Fasmicro – 48 downloads
  14. Appoke – 33 downloads
  15. Soc.io mall – 25 downloads
  16. CNET – 6 downloads

Here are our previous download figures from 6th November 2011:

  1. Appia –  148390 downloads
  2. SlideMe – 20286 downloads
  3. Android Market – 15276 downloads
  4. Mobango – 5393 downloads
  5. AndroidFreeware – 3616 downloads
  6. 1Mobile – Removed as 1Mobile no longer show download stats
  7. Mobiles24 – 1975 downloads
  8. 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)
  9. AndroidPit – 549 downloads
  10. Mikandi – 312 downloads
  11. Amazon App Store – 170 downloads
  12. Handster – 126 downloads
  13. Fasmicro – 38 downloads
  14. Mobireach – 17 downloads
  15. Appoke – 14 downloads
  16. Soc.io mall – 8 downloads
  17. CNET – 1 download

I think its safe to say that there are only 3 stores that matter, which include Appia, SlideMe and Android Market.

If you don’t know who Appia are then they are a content aggregator that aggregates content to stores like Handango and Pocketergear,

It is a little sad to see that the official “Android App Store” is actually the 3rd best performing market on the list. I think Google need to pull their socks up. if they had any sense they would go the way of Appia and aggregate the content, they are sat on top of a potential gold mine.

Its also a little sad to see how awful GetJar are performing, although they do seem to be picking up some traction with our downloads tripling since last month.

And well the Amazon app store, they are probably the biggest disappointment of 2011 for Android. Discover-ability is the worst of all app stores we have our products on, we had to drill down a number of categories and hundreds of other apps just to find our “New” apps. Marketing support is none existent, despite contacting them on numerous occasions for free app of the day feature / promotions we were  simply been ignored. Amazon need to figure what the word “support” means in the phrase “developer support”. We are going to leave our products on Amazon for a while longer to see how the new Kindle Fire performs, if things don’t pick up then we will remove our products and withdraw support for Amazon.

IwGame Engine v0.24 Released – New Unified Ad Engine Support

Its taken a few weeks and loads of chasing people up and tests but we finally got our unified ad engine integrated into IwGame. And to celebrate that event we are releasing the code as open source. You can download the latest version of IwGame Engine from here

Here are the latest changes to IwGame:

  • Bug fix – Headers are now applied to CIwGameHttp GET requests
  • Added CIwGameHttpManager::DetermineUserAgent() to build a browser compatible user-agent
  • Added CIwGameHttpManager::DetermineIPAddress() to determine the users IP address. Please change PING_DOMAIN to your own domain!
  • Added CIwGameString::Replace(char chr, char with) char string replacment method
  • Added CIwGameString::Contains(char chr) to check if a string contains a particular char
  • Added CIwGameString::URLEncode(const char* str) to url encode an ascii string
  • Added CIwGameUtils::GetGraphicModeName(int width, int height) returns VGA style naming graphics mode
  • Added CIwGameAd – Main ad request class which requests and retrievs ads from a variety of ad providers (Inner-active and Adfonic are supported at the moment)
  • Added CIwGameAdView – Requests ads at set intervals and displays them using animations, can cache ads
  • Added CIwGameAdsViewAnimator, a basic example animator that can be used to animate ads in a CIwGameAdsView

As well as the ad request and ad view classes you will notice a few other neat additions that may prove useful such as DetermineIPAddress() and DetermineUserAgent(). DetermineUserAgent returns the IP of the device that your app is running on whilst builds a browser compatible user-agent string for all supported Marmalade platforms. Yes, I know the user-agent is fudged bit it seems to work well and its a lot more compatible with other web API’s than the default s3e user-agent header.

We decided to separate the ad request class CIwGameAds from the actual ad renderer CIwGameAdsView to enable developers to simply use one without the other, so if you just want the ability to put in an ad request feel free to just roll with CIwGameAds. if on the other hand you want the complete package that requests ads at a regular interval, displays them and handles clicks then go with CIwGameAdsView.

We have provided an example with the test bed this update that shows you how to initialise, update and shut down ads (see main.cpp). Lets take a quick look at the code that has been added:

Application ID

All ad networks need some way to identify you and your app as the originator of the ad and click requests, without them you wouldn’t get paid, so ensure that you sign up with any ad network that you are planning on usng and get your Application ID. Each ad p[rovider may call the application ID something different, such as site ID or vendor ID etc.. No matter what they call it, we call it the Application ID and it must be supplied to IW_GAME_ADS_VIEW->Init(Application_ID_String);. Note that the current example will show House Ads from inner-active even with no Application ID (this is just to show you it working).

Note that you can change your Application ID in-between requests as well as which provider you are using, this is a good way to ensure that you get a close to a 100% fill rate maximising your revenue; if one ad provider does not return an ad then request one from the next ad provider. We will add support to automate this at a later date.

Whats Changed in Our Code

Firstly we added the following headers:

#include “IwGameAdsView.h”
#include “IwGameAdsViewAnimator.h”

Then we added an initialisation function to initialise the ads system:

void AdTest_Init() { int width = IwGxGetScreenWidth(); int height = IwGxGetScreenHeight(); // Create ad view CIwGameAdsView::Create(); // Initialise with Application ID (you get this from your ad provider) IW_GAME_ADS_VIEW->Init(""); // Set ad provider IW_GAME_ADS_VIEW->setAdProvider(CIwGameAds::InnerActive); // Set ad request interval in seconds IW_GAME_ADS_VIEW->setNewAdInterval(30); // Force a request for an initial ad IW_GAME_ADS_VIEW->RequestNewAd(CIwGameAds::InnerActive); // Set total number of ads visible in the ads view IW_GAME_ADS_VIEW->setNumAdsVisible(1); // Tell animators to loop IW_GAME_ADS_VIEW->setLooped(true); // Create and attach an animator that fades the ad in over 1 second, pauses for 7 seconds and then fades the ad back out CIwGameAdsViewAnimator* anim = new CIwGameAdsViewAnimator(); anim->Init(); anim->setAdViewDataIndex(0); anim->setCanvasSize(width, height); anim->setInAnim(CIwGameAdsViewAnimator::AnimFadeIn, 1000); anim->setOutAnim(CIwGameAdsViewAnimator::AnimFadeOut, 1000); anim->setStayDuration(7000); IW_GAME_ADS_VIEW->addAnimator(0, anim); // Create and attach an animator that sweeps the ad in from the right the over 1,2 seconds, pauses for 7 seconds and then sweeps back out anim = new CIwGameAdsViewAnimator(); anim->Init(); anim->setAdViewDataIndex(0); anim->setCanvasSize(width, height); anim->setRestingPosition(0, -height / 8); anim->setInAnim(CIwGameAdsViewAnimator::AnimRightSweepIn, 1200); anim->setOutAnim(CIwGameAdsViewAnimator::AnimRightSweepOut, 1200); anim->setStayDuration(7000); IW_GAME_ADS_VIEW->addAnimator(0, anim); // Create and attach an animator that scales the ad in over 1.5 seconds, pauses for 7 seconds and then scales back out anim = new CIwGameAdsViewAnimator(); anim->Init(); anim->setAdViewDataIndex(0); anim->setCanvasSize(width, height); anim->setInAnim(CIwGameAdsViewAnimator::AnimScaleIn, 1500); anim->setOutAnim(CIwGameAdsViewAnimator::AnimScaleOut, 1500); anim->setStayDuration(7000); IW_GAME_ADS_VIEW->addAnimator(0, anim); // Create and attach an animator that rotates the ad in over 1 second, pauses for 7 seconds and then rotates back out anim = new CIwGameAdsViewAnimator(); anim->Init(); anim->setAdViewDataIndex(0); anim->setCanvasSize(width, height); anim->setInAnim(CIwGameAdsViewAnimator::AnimSpinIn, 1000); anim->setOutAnim(CIwGameAdsViewAnimator::AnimSpinOut, 1000); anim->setStayDuration(7000); IW_GAME_ADS_VIEW->addAnimator(0, anim); }

Don’t be alarmed and think OMG this is much harder than using AdMobs or iAds, most of this code is simply for setting up animations. In fact, yuo can just strip out the animation code (marked in orange) and remove it, the adw ill simply sit in the middle of the screen quite motionless.

Now lets take a look at how we update the ad system:

void AdTest_Update() { // Update the ads view IW_GAME_ADS_VIEW->Update(GAME->getCurrentScene(), 1.0f); // Draw the ads view IW_GAME_ADS_VIEW->Draw(GAME->getCurrentScene()); }

Nice and super simple. if you are wondering, the underlying rendering is taken care of by Iw2D.

And finally our Ad clean up code:

void AdTest_Release()
{
IW_GAME_ADS_VIEW->Release();
CIwGameAdsView::Destroy();
}

All nice and easy stuff. Now you can run ads across all Marmalade SDK platforms, depending on the Ad Providers support for those platforms. Thus far we have tested on iOS, Android, Blackberry Playbook and Bada and ads are delivered and clicks registered.

Hiding and Showing Ads

If you are using CIwGameAdsView to display  ads then you can call IW_GAME_ADS_VIEW->setVisible(ad_visibility) to change ad visibility. Note that, if you make the ads view invisible then it will stop requesting and updating ads.

Displaying Multiple Ads

CIwGameAdsView currently supports display of multiple cached ads simultaneously. To enable this feature simply call IW_GAME_ADS_VIEW->setNumAdsVisible(ad_count); This will tell ads view to draw the last ad_count ads that have not expired. You will need to set the screen positions, scales, rotations etc for each separate ad unit by calling setPosition(), setScale(), setAngle() etc methods of CIwGameAdsView. The first parameter is the index of the ad slot you want to change. You cam do this manually or attach animators.

Which Ad Providers Are Supported?

We’ve spent most of the last few weeks trying to integrate with ad providers network API’s, which is made more difficult than it should be because some providers are a bit lax and even unhelpful when it comes to providing integration support, some have been pretty good though, especially Inner-Active, they are very on-the-ball.

We went ahead and left all of the code in there for all providers that we have attempted to integrate this far in case any of you want to pick up on where we left off.

The current list of providers we have attempted integration with includes:

  • Inner-Active – Works incredibly well across all platforms
  • AdFonic – Works, now has full support for carrier and WiFi
  • MobFox – Ads wont deliver over WiFi or carrier, trying to fix
  • InMobi – Ads wont deliver over WiFi or carrier, trying to fix
  • Madvertise – Registering impressions but never returns any ads
  • Mojiva – Awaiting app approval before we can test, so potentially works

We plan to ad support for most of the other major Ad players, once we find details of the REST based API’s

What Information Do I Need to Supply?

You should provide at least the following minimum information to the CIwGameAds class before requesting ads:

  • Application ID

If you want more targeted ads then you can also supply other information such as:

  • Users Age
  • Users Gender
  • Users Location
  • Application Category
  • Users Mobile Number
  • Keywords associated with the user

Note that not all ad providers will use all of the above.

Marmalade SDK Tutorial – Apple iPhone and iPad Deployment and Submissions

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

Its been a while since I posted any new Marmalade SDK tutorials because I have been so incredibly busy, I’ve also been focusing a lot of time lately on the soon to be released IwGameAds update to the IwGame engine (should be up on the blog today). Well, I’m now project free, nothing to work on for clients at the moment, so I have free time to blog.

Ok, lets move into the subject of the blog, debugging, deploying and app store store submissions for iOS devices (iPhone, iPod and iPad). I felt an urgent need to cover this subject as I have noticed many problems popping up on the Marmalade forums relating to iOS provisioning and app store submissions, so my insane desire to help out has got me caught up in an afternoons work of creating this useful guide.

iOS Development on Marmalade Introduction

The great thing about developing iOS apps with Marmalade is that by following a few simple rules your aop will run on any supported device as long as it runs on the Marmalade SDK x86 / Arm simulators. If you have come from a Cocoa / Objective-C background there are a few things to note when devloping with Marmalade SDK:

  • C/C++ is the primary language for development
  • You don’t have access to interface builder, instead Marmalade provides UI and font builder applications for creating complex user interfaces and fonts
  • Development can be done on both PC or Mac.
  • You can add code that has been developed using the iOS SDK / Objective-C via Marmalades extensions developer kit (EDK), but this code will not be cross platform compatible, so will only work for iOS deployments
  • Marmalade now supports native UI via IwNUI allowing you to create UI layouts that use native IOS controls (currently supported on iOS, Android, other platforms will fall back on Marmalade’s generic UI API IwUI)

For the duration of this article we are going to use a fictional app called “iScream Candy” that we are going to fictionally provision, develop and distribute.

iOS Provisioning Introduction

Well, I don’t accuse Apples account set up and provisioning process to be impossible but is has had me in tears before, fortunately in this article I am going to hopefully save many of you a bucket load of tears by providing a nice list of steps showing how to sort all this our quickly and quite painlessly,

What is provisioning and why is it needed by the way? In general terms. provisioning is the process of enabling development for a developer, allowing them to build and deploy apps to Apples devices and limiting access to those apps. This is needed to a) prevent software piracy and b) keeps control of who can develop apps on Apple devices.

The first thing you are going to need is an Apple Developer account. Go to http://developer.apple.com and create one.

Once you have your developer account, you need to click on “iOS Dev Center” to gain access to iOS developer resources. You will be asked to log in again. once logged in you will be presented with the iOS Dev Centre front page, you should note the “iOS Developer Program” menu down the right hand side of the screen

Here you will see 4 options, but we are only really interested in the first one for now “iOS Provisioning Portal”, click on it to go the provisioning portal.

Now take a look down the left hand side of the screen, you will see quite a few options. These options allow us to generate developer and distribution certificates, add devices that are allowed to run our apps, create app ID’s and provisioning profiles.

iOS Development Certificates

In order to develop and distribute products on the iOS platform Apple needs to know that our app is made by us and that our apps code is reliable and if something should go wrong Apple know where to go knocking. Security certificates allow developers to sign applications using their identity showing that they are “trusted” and not some malicious software developer that’s creating apps to destroy iOS devices or steal users personal details.

There are two kinds of certificates that you are going to need:

  • Development certificate – You need this to deploy your app to iPhone. iPad and iPod
  • Distribution certificate – You need this to deploy your app ro the Apple app store

Creating an iOS Development Certificate

In order to deploy our cool iOS apps to our iPhone, iPod or iPad we need to create a development certificate. This process starts with the Marmalade SDK. Here are the complete instructions:

1. Run the Marmalade iPhone Sign Request tool, this will launch Marmalades signing request tool which will create a developer key and a signing request for you
2. Click “Browse” and select a folder where you want Marmalade to save the signing request
3. Select “developer_identity.key” from the Key File drop down
4. Now enter your developer company name into the “Common Name” box
5. Enter the email address that you have assigned to your Apple developer account into the Email Address box
6. Finally hit the “Run” button

The tool will now generate a file called signing_request.csr in the folder that you selected in step 2. It will also generate a developer_identity.key key file in the \Marmalade\5.x\s3e\deploy\plugins\iphone\certificates folder (make a backup of this file)

Now over to the Apple side of things:

7. Go to the “iOS provisioning portal”
8. Click on the “Certificates” menu
9. Click on the “Development” tab
10. Click on the “Request Certificate” button
11. You will see a button at the bottom of the screen called “Choose File”. Click that button and select the signingrequest.csr file that you exported from Marmalades signing request tool
12. Click the “Submit” button. The certificate will be marked as “issued”. Click on the “Development” tab again to refresh the page (sometimes you need to refresh few times), this will add a button called “Download” to the right of the screen
13. Click on the “Download” button, this will download a file called “ios_development.cer”, save this file
14. Make a backup of this file and also copy and rename the file as \Marmalade\6.x\s3e\deploy\plugins\iphone\certificates\developer_identity.cer
15. Marmalade will now use the developer_identity.key and developer_identity.cer to sign your apps for deployment during development

Creating and Provisioning an iOS Application for Development

You probably already have test app or even a full app that you are waiting to test out on an iOS device, but before you do, there are a couple of changes you need to make.

The first thing you will need is an Application ID (App ID) which uniquely identified your app to the world. To create one we need to head back over to Apples iOS provisioning portal and carry out the following steps:

16. Click App ID’s option on the menu
17. Click “New App ID” button
18. Enter “iSCream Candy” as the app description
19. Enter “com.yourcompanyname.iscreamcandy” as the Bundle Identifier
20. Click the “Submit” button which takes you back to the App ID’s list

In order to deploy to an actual device we need to add our Apple device to the provisioning portal like this:

21. Click on the “Devices” menu
22. Click the “Add Devices” button
23. Enter a name for your device (anything you like)
24. Enter your devices Device ID. To get your devices ID carry out the following steps:

  • a. Plugin your device into the USB
  • b. Run the iPhone Configuration Utility
  • c. Select your devices in the left hand menu
  • d. In the summary tab you will see an “Identity” field, the long hexadecimal string is your Device ID
  • e. Keep the configuration tool open because you will need this in a moment to install your provisioning profile to the device

25. Click the “Submit” button

You will also need a developer provisioning profile, so head back to Apples provisioning portal and carry out the following steps:

26. Click on the “Provisioning” menu
27. Click “Development” tab
28. Click “New Profile” button
29. Enter “iscream_candy” as the Profile Name
30. Tick the box next to your certificate name to associate the certificate with this profile
31. Select “iScream Candy” as the App ID
32. Tick the checkbox next to your iOS device that is in the list of devices
33. Click “Submit” button
34. Click on the “Development” tab to refresh the screen
35. Click the “Download” button at the side of the “iscream_candy” profile name and save the file (will be called “iscream_candy.mobileprovision”)
36. Drag the provisioning profile file “iscream_candy.mobileprovision” onto the iPhone Configuration Utility
37. Select your iOS device in the left hand menu in the the oPhone Configuration Utility
38. Select the “Provisioning Profiles” tab
39. Locate “iscream_candy” and click the “Install” button that is shown next to it

Now we go back to the Marmalade side of things. We need to let the Marmalade deployment tool know a few things about your app before we deploy:

40. Open up your projects MKB file
41. Add a section like this:


deployments { [“iPhone”] name=’iScreamCandy’ caption=’iScream Candy’ manufacturer=’Company Name’ provider=’Company Name’ version-major=1 version-minor=0 iphone-appid=’com.companyname.iscreamcandy’ }

This deployment section will allow us to auto fill in the information that we provided when we use Marmalades deployment tool to deploy our app to our iOS device.

We are now ready to build and deploy our app to the iPhone, iPad, and iPod.

Building and Deploying our App to an iOS Device

Ok, now we have provisioning for development and we have a deployment section added to our MKB project file, lets get our app installed to the device for testing.

42. In Visual Studio / XCode change the build type to GCC (ARM) Release and hit go, the project will now build. Once built, Visual Studio will launch the Marmalade Deployment Tool.
43. Select “ARM GCC Release” as the Build Type then click the Next button
44. Select “iPhone” as the deployment configuration then click the Next button
45. Select “iOS” as the platform to deploy to then click the Next button
46. Click the “Deploy All” button
47. When the deployment tool is finished it will create two files in our iPhone release deployments folder (the deployments folder is located in our build folder build_iscreamcandy_vc10\deployments\iPhone\iphone\release

Its worth noting here that you should check the deployment log to ensure that all went well, to do this click the “Log” button

48. Drag the iscream_candy.ipa file from that folder onto iTunes
49. in iTunes select your phone on in the menu on the left of the screen
50. Click on the apps tab and tick the checkbox next to our iScream Candy app then click on the Sync button to install the app

All being well the app should now appear on the iOS device.

Word of caution, delete your existing app from the iOS device before redeploying. Unless you change the version number of your app in the MKB file, iTunes will not install the same version number of an app if it already exists on the device.

Creating an iOS Distribution Certificate

So now you have a finished product and you want to submit it to the Apple app store for approval. The first thing you are going to need is a distribution certificate

In order to deploy our cool iOS apps to the app store we need to create a distribution certificate. This process starts with the Marmalade SDK, here are the complete instructions:

51.. Run the Marmalade iPhone Sign Request tool, this will launch Marmalades signing request tool
52. Click “Browse” and select a folder where you want Marmalade to save the distribution signing request
53. Change the name to “distro_signing_request.csr”
54. Select “distribution_identity.key” from the Key File drop down
55. Now enter your developer company name into the “Common Name” box
56. Enter the email address that you have assigned to your Apple developer account into the Email Address box
57. Finally hit the “Run” button

The tool will now generate a file called distro_signing_request.csr in the folder that you selected in step 2. It will also generate a distribution_identity.key key file in the \Marmalade\5.x\s3e\deploy\plugins\iphone\certificates folder (make a backup of this file)

Now over to the Apple side of things:

58. Go to the “iOS provisioning portal”
59. Click on the “Certificates” menu
60. Click on the “Distribution” tab
61. Click on the “Request Certificate” button
62. You will see a button at the bottom of the screen called “Choose File”. Click that button and select the distro_signingrequest.csr file that you exported from Marmalades signing request tool
63. Click the “Submit” button. The certificate will be marked as “issued”. Click on the “Distribution” tab again to refresh the page (sometimes you need to refresh few times), this will add a button called “Download” to the right of the screen
64. Click on the “Download” button, this will download a file called “ios_distribution.cer”
65. Make a backup of this file and also copy the file as \Marmalade\6.x\s3e\deploy\plugins\iphone\certificates\distribution_identity.cer
66. Marmalade will now use the distribution_identity.key and distribution_identity.cer to sign your apps for distribution to the app store

Creating and Provisioning an iOS Application for Distribution

We need a fair few bits and bobs in order to create an app that is ready for distribution to customers that are foaming at the mouth ready to spend their hard earned dollars on your new masterpiece (I wish lol). The first thing we need is a distribution provisioning profile that we can include with the app during submission, here’s how to generate it:

67. Click on the “Provisioning” menu in the iOS Provisioning Portal
68. Click “Distribution” tab
69. Click “New Profile” button
70. Ensure that “App Store” is selected
71. Enter “distro_iscream_candy” as the Profile Name
72. Select “iScream Candy” as the App ID
73. Ensure that the “Distribution Certificate” says “Company Name (expiring on {Some date in the future})”
74. Click “Submit” button
75. Click on the “Distribution” tab to refresh the screen
76. Click the “Download” button at the side of the “distro_iscream_candy” profile name and save the file
77. Copy the saved distro_iscream_candy.mobileprovision file to the Data folder in your build

Now over to the Marmalade side

78. Open up your projects MKB file
79. Update your deployments section to look something like this

deployments
{
  ["iPhone"]
  name='iScreamCandy'
  caption=''iScream Candy'
  manufacturer='Company Name'
  provider='Company Name'
  version-major=1
  version-minor=0
  iphone-appid='com.companyname.iscreamcandy'
  iphone-splash="data/Default~iphone.png"
  iphone-icon="data/icons/iPhoneIcon.png"
  iphone-icon-ipad="data/icons/iPadIcon.png"
  iphone-icon-high-res="data/icons/iPhone4Icon.png"
  iphone-sign-for-distribution='1'
  iphone-provisioning-profile="data/distro_iscream_candy.mobileprovision"
}

You will notice a few other extra pieces of information have appeared in the MKB file. As we are getting ready to distribute our app we also need to provide icons and splash screens. If you app is a unified iOS app (compatible with iPhone and iPad) then you need to supply splash screens and icons for both platforms.

Getting ready for iOS App Store Submission

Before we can submit our super cool but hastily named game to Apple for approval we need to create app icons, splash screens, screen shots and text / keywords etc..

80. The iOS expects the following sized icons (see above MKB deployment section to see how to include them)

  • iphone-icon – Standard iPhone icon (57 x 57 pixels)
  • iphone-icon-ipad – Standard iPad icon (72 x 72 pixels)
  • iphone-icon-high-res – iPhone with retina display (114 x 114 pixels)

81. In addition, you need to supply 3 different splash screens that need to have specific names:

  • Default~iphone.png – Standard iPhone splash screen (320 x 480 or 480 x 320)
  • Default~ipad.png – Standard iPad splash screen (768 x 1024 or 1024 x 768)
  • Default@2x~iphone.png – iPhone with retina display (640 x 960 or 960 x 640)

To ensure that these files get included in your build you need to add them to the assets section of your MKB file like this:


assets { (data) “Default~iphone.png” Default@2x~iphone.png “Default~ipad.png” }

82. You also need the following additional graphical items:
* 512 x 512 iTunes Artwork Icon – This is a hi-resolution version of your app icon
* At least 3 iPhone screen shots (320 x 480 or 480 x 320)
* At least 3 iPad screen shots (768 x 1024 or 1024 x 320)

iOS App Store Submission

We are finally there, woohoo, I’m so glad because my fingers are starting to break!

83. To submit an app to Apple you need to log into iTunes Connect (menu option beneath Provisioning Portal) on the iOS dev web site
84. Click on “Manage Your Applications”
85. Click on the “Add New App” button to create a new application
86. Enter “iScream Candy” as the App Name
87. Enter SKU number (put anything you like or that’s relevant to how you track apps)
88. Select “com.companyname.iscreamcandy” as the Bundle ID
89. Click the “Continue“ button
90. Select availability date to some point in the future (choose 2-3 weeks from now, you can change this when the app is passed)
91. Select price tier (to find out what the tiers mean in dollars click the “View Pricing Matrix” link)
92. Click the “Continue“ button
93. Fill in the app information, add app icon and screen shots etc..
94. Click the “Save” button
95. Click on the View Details for your app
97. Click on the “Ready to Upload Binary” button at the top right of the screen
98. Select “No” when asked about export compliance (unless you are using encryption) then click the “Save” button

The next screen will tell you how to download and install XCode so you can gain access to Application Loader (a small app that lets you send you binary to apply for certification)

99. Click “Continue”
100. Locate and run “Application Loader” on the Mac (Minimum version Mac OS X 10.5).This should be located in /Developer/Applications/Utilities/Application Loader.app. if not then you will need to download and install either the latest version of XCode or iOS SDK 3.2
101. Click “Next” on the application loader welcome screen
102. Log in with your iTunes Connect log in details
103. When asked to “Choose Application” select the iScream Candy application from the drop down list and click “Next”
104. Check that the application metadata information is correct then click “Choose” to browse and select your applications binary zip file
105. Click the “Send” button to send the application binary to Apple
106. Once the application has finished uploading you will see a thank you screen, click the “Done” button to close it. If the application was not signed properly you will be notified here

Enabling Push notifications

For some odd reason Apple knocks all our apps back that are not push enabled (even though we do not use it), here’s the additional steps you will need to carry out to enable it.

107. Click “Configure” link next to the app ID for iScream Candy
108. Tick the “Enable for Apple Push Notification service” check box
109. At the side of the “Production Push SSL Certificate” click the “Configure” button
110. A window will pop up, click the “Continue” button
111. Click the “Choose File” button and select the signing_request_dtstro.csr file from earlier
112. Click the “Generate” button
113. Click “Continue” button then the “Done” button

And that’s it, you’re app is now in Apple heaven. It usually takes between 7 and 21 days to get approval, less if it is an update.

A few Additional Notes

  • I asked you to back up your certificates as you generate them earlier because when you install a new version of the Marmalade SDK you may lose them as you uninstall the previous version of the SDK. If you back them up you can simply copy them back into the \Marmalade\5.x\s3e\deploy\plugins\iphone\certificates folder
  • Provisioning profiles expire so you need to renew them now and again. Your IOS device will usually remind you when you need to renew a provisioning profile.

Well that’s its for this article. With any luck I have saved some of you much pain and suffering and hopefully a few buckets of tears

Marmalade are Having a Christmas Sale!

Whilst I’m not much keen on Marmalade on my toast, it certainly tastes nice when it comes to cross platform game and app development. Not only can I write code in a single language, but I can also deploy to over 10 platforms with ease, including iPhone, iPad, Android, Bada 1.0 / 2.0, Blackberry Playbook, LG-TV, Symbian, Windows Mobile, WebOS, Mobile Linux, Windows and Mac OSX!

The people behind the best cross platform native SDK (that’s the Marmalade SDK for all you inter-galactic new arrivals) are now having a Christmas license sale. All licenses are now 20% off! If you have been toying with the idea of buying a license then I suggest you get it now and save yourself 20% off the usual price, bringing the basic license down to $134 and the pro license down to $399.

Don’t forget you can also get yourself a free license by getting accepted into Marmalade’s apps program or by contributing code to the community.

So go to Marmalade’s web site and grab a license whilst prices are stupidly cheap.

Murder Detective Hampton Bridge Murder Blackberry Playbook HD Game Out Now

Our client just released their Marmalade SDK powered HD adventure title “Murder Detective – Hampton Bridge Murder” on Blackberry Playbook, iOS and Android coming very soon.

https://appworld.blackberry.com/webstore/content/67338?lang=en

Games Description:

Murder Detective – The Hampton Bridge Murder. Join Detectives Phil McDermott and Dave Stanton as they try and solve the mystery of a woman found murdered on the banks of the Hampton River. Unravel the complex crime story and choose your path. Your choices will determine how the story ends. An interactive mystery where you control the adventure. Gather evidence, interrogate suspects, follow the clues and catch the murderer. You will be given a detective ranking at the completion of the case based on your attention to detail.

An Interactive Detective Mystery. Be Part of The Adventure. Play as Detective McDermott. Choose Your Path. Catch The Killer. Solve The Crime.

Screen Shots


 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Funky Cam 3D goes FREE!

Recently we looked at ways of monetising apps and games by charging nothing for them. Yes, I know it sounds ridiculous doesn’t it. Well, its not quite as ridiculous as it sounds. Its possible to make money from apps and games by either a) giving the game away for free and inserting ads in there (usually called ad-ware) and b) again, giving the game away for free but selling optional extras within the game (usually called freemium).

We recently implemented a platform agnostic API that uses the Marmalade SDK and Inner-actives M2M protocol to serve ads to all Marmalade SDK compatible phones and tablets. Currently supported platforms include iPhone, iPad, Android, Samsung Bada, Blackberry Playbook, Symbian, Windows Mobile, WebOS, PC and Mac.

The great thing about our ads is that they are different. Our ads don’t just sit at the top of the screen crying like babies for attention, instead they leap out at the user with animations and transitions, hypnotising the user into clicking on them. We like to see the process as bringing gaming to ads and not bringing ads to gaming.

We are opening up our API very soon for all Marmalade SDK developers. The ad engine will also become part of the IwGame engine with additional support for MobClix, AdWhirl and InMobi. Depending up on the API’s success we may also create bespoke versions for the iOS and Android SDK’s for those die hard developers that won’t convert to the Marmalade SDK. We will put a proper blog together  when the time comes.

Our animating ads work very well and our click rate (CTR) is proof that the pudding is cooked well. Here are a few figures:

  • Android – 3.23%
  • iPhone – 7.34%
  • iPad – 3.54%
  • Samsung Bada – 5%

Our average CTR with static AdMob ads is 1.76%

Ok, now onto the real subject, we have released Funky Cam 3D across iPhone, iPad, Android and Samsung Bada (Bada 2.0 coming soon).

Funky Cam 3D FREE can be downloaded from the following stores:

So please feel free to download Funky Cam 3D for free and check out what our animating ads look like.

Marmalade SDK 5.2 has Arrived

Well, I’m very pleased to announce that the eagerly awaited version 5.2 update to the Marmalade SDK is finally here. Some great new features have made it into the build including:

Native UI (IwNUI)

Native UI is a cross-platform UI framework that utilizes native controls. This allows developers to create user interfaces with native look and feel using a simple cross platform framework. Currently Marmalade supports Native UI on iOS and Android platforms, with IwUI used as a backend for all other platforms.

What does this mean for us cross platform phone and tablet developers? I can tell you, it means a great deal. This single addition to the SDK makes Marmalade a very viable application development platform for regular app style projects using the phones / tablets own native UI look and feel.

Bada 2 support

Support for Samsung’s bada platform is extended with this release; Marmalade can now target bada 2.0 devices.

We get a new platform, woohoo, the is the main reason why I love Marmalade so much!

iOS 5 EDK Support

iOS support has been extended to support building extensions with iOS 5.0 SDK. Extensions can now include features from iOS 5.0.

So we get access to new iOS 5.0 features via the EDK, which is great. iOS 5.0 has over 200 new features, such as the new notifications centre, iMessage, Reminders and iCloud,

Xcode Plugin Upgraded to Support Version 4.2

The Mac OS X SDK now supports Xcode 4.2 and the compiler and editor changes that were introduced with the iOS 5.0 SDK. Support for Xcode 3.x has been officially dropped. Please upgrade to the latest version. If required, Xcode 4 can be installed in parallel to any existing 3.x installation by specifying a different install location and using the xcode-select command line tool.

iOS Remote/Push Notification Support

Added full support for remote/push notifications in s3eIOSNotifications, including support for embedding provisioning profiles in development builds.

EDK Support on OS X

Extensions are now supported for Mac OS X deployments.

WebView Enhancements

s3eWebView now supports transparency and local file access.

Also included are many bug fixes and other minor enhancements and changes, too numerous to mention in fact. The full list is available in the re,lease notes on Marmalade’s web site

IwGame Engine Update – v0.230

Well its been an interesting day to say that its a Sunday, some good news and some bad new . The good news is that I managed to sneak some time in today to add a few updates to IwGame. The bad news is that some robbing (insert lots of non-religious type words here) has skimmed my card and robbed my bank account! (Can’t these people just get jobs like the rest of us!). Anyways, anger vented, now to get back on topic. We have just updated the IwGame game engine to v0.230. If you don’t know what IwGame is then in short it is a cross platform game engine for smart phones and tablets based upon the awesome Marmalade SDK. Here are the new features:

  • Added CIwGameImage::CreatePNG(int& size) to CIwGameImage to allow the creation of memory based PNG files
  • Added pngilb and zlib dependents
  • Added helper support to CIwGameInput for detecting touched, tapped events, delta change and back / menu buttons
  • Added CIwGameSprite::HitTest(int x, int y) which basically tests to see if a screen point is inside a sprite (takes into account scaling and rotation)
  • Added CIwGameAudio, CIwGameSound and CIwGameSoundCollection classed to support playback of sound effects and music
  • Added visual layers to sprites and actor system allowing sprites / actors to be depth layered
  • Added support for clipping in CIwGameScene. The scene can now be clipped to a rectangular area of virtual canvas

And here are the general changes / bug fixes:

  • Changed CIwGameFile::Open(const char* path, const char* mode, bool blocking), we now use mode instead of read / write flag
  • Added new CIwGameFile::Seek(int offset, s3eFileSeekOrigin origin) method
  • Replaced CIwGameHttpPostData::AddHeader() with CIwGameHttpPostData::SetHeader() to allow replacement of http headers
  • Added ClearRequests() and CancelRequests() to CIwGameHttpManager() allowing us to clear the request queue and cancel any in progress http requests
  • Removed two bugs from CIwGameInput, one that was stopping button / key presses and another that was preventing keyboard update if touch screen wasn’t present (doh!)
  • Added helper support to CIwGameInput for detecting touched, tapped events, delta change and back / menu buttons
  • Fixed CIwGameScene::removeActor(CIwGameActor* actor) bug (could not remove unnamed actors)
  • Fixed CwGameScene::removeActor(unsigned int name_hash) (would not deallocate pooled actors for re-use)
  • Fixed sprites initial state as invisible bug in CiwGameSprite
  • Moved Width and Height from CIwGameBitmapSprite to CIwGameprite, makes sense that all sprites would need to have a size
  • IwGame has been made into its own standalone project
  • The IwGame Testbed has now been moved to the TestBed folder

Important note, IwGame now exists as a separate project from the test bed. You now have to add IwGame to your project by adding IwGame to the subprojects section of your MKB file. The test bed is also a separate project and is located in the IwGame sub folder named TestBed. Lets take a quick look at some of the changes

Sprite Depth Layers

Its now possible to layer sprites in a sprite manager. The feature is automatic, all you have to do is set the layer of the sprite using setLayer(int layer_number). To set the number of depth layers available to the sprite manager you pass the layer count into the sprite managers Init() method. The default is set to 10 layers. As a scene contains a sprite manager to handle its contained visuals, you can also specify the number of depth layers when you initialise a scene: int Init(int max_collidables = 128, int max_layers = 10); Again, the default is 10 layers. Note that sprites on higher layers will be drawn on top of sprites on lower layers.

Creating PNG’s

You can now create an in-memory PNG file from a  CIwGameImage using CIwGameImage::CreatePNG(): uint8* png_data = image->CreatePNG(png_size); The method currently only supports images in RGB_565 and RGB_888 format. more formats will be added when I implement a new pixel conversion helper class.

CIwGameInput Expansion

I decided to pan CIwGameInput out a little adding new methods to do common tasks such as:

  • bool hasTapped() – Returns true if user tapped the screen
  • bool isTouching() – Returns true if user is currently touching the screen
  • CIwVec2 getTouchedPos() – Returns the position at which the user is touching the screen
  • CIwVec2 getDragDelta() – Returns the number of pixels the user has moved their finger / stylus since the last frame
  • bool isBackPressed() – Returns true if the back button was pressed (nice for Android)
  • bool isMenuPressed() – Returns true if the menu button was pressed (nice for Android)

These should help if you want to get up and running quickly with input.

CIwGameSprite hit testing

CIwGameSprite got a new method called hitTest() that lets you check to see if a point is inside a transformed sprite:

// Generate transformed vertices bool CIwGameSprite::HitTest(int x, int y) { // Generate transformed vertices int w = Width / 2; int h = Height / 2; TransformedV[0].x = -w; TransformedV[1].x = w; TransformedV[2].x = w; TransformedV[3].x = -w; TransformedV[0].y = -h; TransformedV[1].y = -h; TransformedV[2].y = h; TransformedV[3].y = h; for (int t = 0; t < 4; t++) TransformedV[t] = Transform.TransformVec(TransformedV[t]); int i1 = 0; int i2 = 3; for (int t = 0; t < 4; t++) { int x0 = TransformedV[i1].x - TransformedV[i2].x; int y0 = TransformedV[i1].y - TransformedV[i2].y; int x1 = x - TransformedV[i2].x; int y1 = y - TransformedV[i2].y; if ((x1 * y0 - x0 * y1) >= 0) return false; i2 = i1; i1++; } return true; }

This basically transforms the sprite by the sprites current transform and checks to see if a point falls inside the sprite (takes into account rotation and scaling). If you are curious about the method it uses dot products . If the points liles on the outside of any of the lines that make up the sprite then it cannot possibly be inside the polygon.

CIwGameAudio – Let there be Sound

Yes, that’s right IwGame just got audio. I basically built a wrapper on top of IwSound that lets you easily play sound effects located in a resource file as well as music. New classes include:

  • CIwGameAudio – This is the singleton that is responsible for creating, destroying and updating the audio system
  • CIwGameSound – This class represents an instantiates sound effect
  • CIwGameSoundCollection – This class represents a collection of sound effects

if you are using IwGame then you do not need to do anything except load a resource file that contains your sound effects and set the CIwGameAudio’s group like this:

CIwResGroup* AudioGroup = IwGetResManager()->LoadGroup("Audio.group"); IW_GAME_AUDIO->setGroup(AudioGroup);

You then play sound effects like this: IW_GAME_AUDIO->PlaySound(“explosion”); And music like this: IW_GAME_AUDIO->PlayMusic(“music.mp3”); Couldn’t get much simpler really However, if you want to set up and update the audio system yourself you will need to:

// Initialise audio system CIwGameAudio::Create(); IW_GAME_AUDIO->Init();

Then in your main loop, every frame call:

// Update audio IW_GAME_AUDIO->Update();

And finally on clean up call:

// Shut down audio IW_GAME_AUDIO->Release(); CIwGameAudio::Destroy();

CIwGameScene Scene Clipping

You can now set a rectangular area on a  per scene basis that all actors / sprites within that scene will be clipped to. Parts of sprites that fall outside the clipping region will not be drawn. To set up clipping simply call CIwGameScene::setClippingArea(int x, int y, int w, int h) where x and y are the top / left hand corner of the clipping area whilst w and h are the width and height. Note that clipping coordinates are not specified in pixels but in virtual canvas coordinates. The origin (0,0) is the centre of the screen. So if you virtual canvas is set to 480 x 320 pixels then use x = -240, y = -160, w = 480, h = 320 to clip to the full canvas, although you can just set w to 0 to disable clipping (that’s the default).

Well that’s it for this week, unfortunately I didn’t get the time to do a new Marmalade SDK tutorial but I will try and get that done mid next week. I have some free time coming up soon so I can knock lots of tutorials out. Also have some interesting news coming up soon about an SDK we just finished that pulls ads from inner-active and displays them all fancy 🙂 Compatible with all Marmalade deployment platforms.