I've been working for a month and a bit on a game, using cocos2d-x on the marmalade platform. Finding information about on the internet has been a frustrating experience due to its rarity, but that issue is amplified tenfold when cocos2d-x is thrown in the mix -- few people seem to use the combination, or at least ask and answer questions about it. But I digress. Currently I'm working on getting the Android side working before dealing with iOS.
I want to get ads into my game. I have found sdks for marmalade and for cocos2dx, but not both at the same time. This raises issues.
IwGameAds: iw2D and iwgl don't play nicely because they change both change gl states. Cocos2d-x uses gl. The solution to that problem is to wrap iw2D with save and restore, as mentioned here, but iwgameads requires this to be placed in the main loop:
// Update the ads view
IW_GAME_ADS_VIEW->Update(1.0f);
// draw the ads view
IW_GAME_ADS_VIEW->Draw();
The problem here being that the cocos2d-x main loop implementation is hidden to me. I could hook in the update easily enough, but the draw is more difficult -- where do I put it? Do I override my game layer's draw(), call super and do the gl state saving stuff before calling iwgamead's draw?
RevMob: neither revmob sdk (marmalade or cocos2d-x) allows for banner positioning (the default banner stretches to take up 1/4 of a landscape screen) or callbacks. I managed to get banners and fullscreens showing using their marmalade sdk easily, but the game continues to run behind the full-screen interstitial whenever it deigns to appear after being called... which often results in cocos2d-x crashing.
Their cocos2d-x sdk is much harder to integrate with marmalade and I've been unable to progress past "jni.h not found" errors. I presume that if I got that working the crash/running in background would resolve itself, but I'd be left with the more-than-problematic design flaws.
InMobi: marmalade's s3eInMobiAds subproject is nice and all, but won't allow me to test anything without a published app. This one is more promising than RevMob because banner positioning and event callbacks appear to be possible, but due to marmalade and cocos2d-x's gl conflicts, this might turn out to be just as bad a solution as iwgameads. I've emailed them about the possibility of being able to test+integrate during my app's development.
s3eFlurryAppSpot: The test project supplied with marmalade works (there's a bug where the first ad doesn't display), but I guess it doesn't play nicely with cocos2d-x as nothing displays despite the logs saying otherwise. Full-screen ads work, but appear to be portrait only. As with revmob, these don't pause the game, but there are at least callbacks to fully control the flow of things.
AdMob and others: other ad providers I've found for cocos2d-x tap into the underlying java. It increasingly seems to me that this might be the direction I need to go in to implement ads. However I can find scant resources on how to do this sort of thing or even if it's possible under marmalade.
Has anybody had success with ads using marmalade+cocos2d-x and could point me in the right direction?