Admob plugin causes frame rate drop when the ad cycles

I can’t speak for interstitial ads but my issues is with admob banners. I use interstitial ads from vungle which works flawlessly so I would suggest you use that. If someone could let me know if other ad network banners work without issues that would be great. As for now, I will either wait or remove those ads and add more vungle ones. 

I’m using vungle with admob on a 50/50 basis.  Currently I’m receiving over 4x as much revenue from AdMob as I am from Vungle.  The sample size is pretty small (only about 200 users) but it seems a huge difference and important that I can use AdMob before I make my game free to play.

Thanks for those stats editor. If true, then I am in the same position… great…

I think this should be fixed as people do not buy games anymore so we need to have ads, The top new paid releases struggle to get 5,000 downloads. Corona needs to talk to Google or implement their own multi-threading approach. It actually boggles my mind that mobile apps are so clunky as to need everything loaded before the next frame is processed…

and let’s not get started on Android audio lag… lol. What kind of incompetent person created Android?

Hi Rob,

Can’t the corona team just move the ad code plugin out of enterFrame? Why does it have to be tied so closely to the main graphics loop? Like push it to a different thread or something so that if it is coded badly by google and frequently blocks, it won’t affect fps.

Unfortunately, we will probably get no fix from Corona, they don’t care to much about ads.

The AdMob plugin already does not support the whole features from AdMob ads, they promised to make an API to get the banner height but not sign of that, now this game-breaking FPS drop issue.

Ads should be on top of the priority, as there isn’t really any real ad provider as good as AdMob, it should work flawlessly and full supported.

I think they must fix it. If this is a widespread issue, they would be able to pull a lot of new members in if they fix it first. Alternatively they could lose a lot when another SDK manages to bypass this.

If I was searching for an SDK now, and I saw a message saying there won’t be a fix, I’d not come back… This height API is also crucial. I can’t believe it isn’t here yet. I really wish I knew what goes on behind the scenes that seems to mess up priorities.

For one, it’d be good to get first hand updates from engineering, rather than passed on interpretations.

Rob I hate to say it but this is an issue which makes Corona SDK a very poor choice if someone is looking to compare cross-platform mobile development tools.  It is essential this problem is fixed…and soon!

thanks

Just chiming in here really quick, as I can see how frustrated some of you are. Totally understandable.

On the other hand, I see some speculation, so I want to address that with what we know. I’ll conclude with some recommendations based on AdMob’s stated best practices.

Let’s start with what we know:

  1. From a technical perspective, there’s nothing architectural about Corona that’s causing the slowdown.

In particular, AdMob does NOT run inside the Corona “enterFrame”, as was mentioned earlier. AdMob runs outside of Corona, and is competing with Corona for system resources, so if AdMob HTML5 ads are eating up CPU resources, there’s nothing Corona can do about it.

  1. This DOES look like an AdMob issue. It is NOT unique to Corona.

A quick Google search confirms this. The pattern is that some people see this issue, while others don’t — it really depends on the content you’re making. 

For example, here’s one thread discussing the issue (http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=12558) and here’s a thread on Cocos2D-x (http://cocos2d-x.org/forums/6/topics/34052). There was even a thread on the Unity forums from a month ago that comes up in the search results, though (oddly) that thread appears to now be deleted… 

  1. We did look into this issue further to see if there’s anything we can do on our side. Unfortunately, we didn’t see anything that’s within our control to magically make this go away (or else we would have done it by now!)

So here’s what we recommend, and some of you probably don’t want to hear this, but this recommendation comes straight from AdMob’s best practices (https://support.google.com/admob/answer/2790280?hl=en):

Think about the user

Our ads are designed to visually complement the content of your applications. Good ad placement can provide publishers with reliable revenue without sacrificing user experience.

Think about the flow of user engagement within your application. Place your ads where users might be expected to be less engaged with the content of the application, such as transitions in written content, during level changes of a game, or when a user might be expected to exit the application.

It’s pretty clear from what Google recommends that they are optimizing AdMob for situations where CPU resources are freely available (e.g. transitional points such as “during level changes of a game”), not for situations where there’s competition for them (e.g. during a game level). So based on that, I would recommend rethinking your ad placement strategy. To do otherwise, risks facing an uphill battle against Google!

Thanks for the detailed reply Walter. This is really pathetic coming from google. It may even be intentional to push ads away from gameplay.

Is there a communication between you and Google? I just can’t see how they would keep it this way… At least they should allow a legacy mode or something…

And to be clear… There is no way to push the ads.show to another thread? Oh… And that height API? Hehe

Anyway, thanks for the good work with corona. It works amazing when not screwed by external issues. To avoid future complaints, I’d publish some documents detailing this and the Android lag issue and ensure they answer the regular questions.

This FPS drop is a GREAT problem, users started to complain about it in my games.

Wondering why does this not happen in my Java written games?

Maybe it is because I am using “normal” banners there (not smart banners).

I would once more beg Corona Labs to implement them.

Since here in Croatia we can’t have a merchant account for Google Play, ads is the only revenue income and with this FPS drop problem I really don’t know what to do.

Hi @ubj3d.android,

We have not seen any proven case where “normal” banners are going to behave any differently than “smart” banners, in regards to performance. Is there specific evidence of this in other usage/platforms, i.e. a proven test case that you’re 100% certain is a result of one type versus the other?

Thanks,

Brent

Hey Brent,

Just a note that may help: I can confirm that I have seen non-smart banners several times coming up and these do not trigger the problem. Only when smart banners start to animate is when the FPS drops. When the animation stops, it immediately recovers to the normal FPS.

I have seen this several times while testing my games on an Android device.

Hope it helps.

Cheers

It seems we have a myriad of reports that there is a problem with the admob implementation and that this is an important issue for many corona users. 

Corona team: I would love to see a workaround for this issue. Why don’t you just code up a test project with a normal banner and then you will have your own proven test case whether it exhibits the bug or not. Let’s see some progress on this! :slight_smile:

I can confirm that the frame rate drop occurs when the banners load and when they animate. Static ones are fine once they are loaded. I’m not sure if there is a way to limit ads to static ones…

Hi Brent,

thank you for the reply.

Please try my game “Ultimate Blackjack 3D” (it uses OpenGL for 3D) and AdMob "normal"banners.

Runs very smooth, never had any FPS drops.

Wondering why would you not support AdMob at it full potential, especially as there is no real competition to them.

Really hoping we’ll get word on a fix for this soon.  It’s pretty much rendering admob banners unusable and there aren’t any other banner ads out that are worth implementing revenue wise… so pretty much a deal breaker for any game planning on making money from ads…

Hey Rob,

Do you know if integrating admob natively through Corona Enterprise would be a possible workaround for this in the mean time??  I’d hate to have to upgrade to enterprise just for this, but like I said, it’s a deal breaker…

Thanks!

Since we don’t know why there is a frame drop, I can’t really answer it.  If you did, you would be implementing it on your own and if the issue is in the plugin, then maybe.  But if the cause of the slowdown is in the AdMob SDK then you’re likely to hit the same problem.

I know Engineering is looking into it.  Let’s give them a few more days (don’t count the weekend) to see if they have an answer.

Rob

Hey Rob,

Thanks for the response.  Any word from Engineering?  I found that it was definitely more laggy when the banner was displaying textual ads that cycle the text vertically.  

I went ahead with the enterprise trial and found that the setup was a nightmare, so that’s been somewhat abandoned.  

Also went and tried integrated pinsight media ads with an even worse result than admob’s banner.  not only did the frame rate drop, but the audio stuttered like crazy as well.

Hoping those engineers find something…

I just wanted to post that I’m having the same issues. Hopefully engineering can find the solution quickly.