Admob plugin causes frame rate drop when the ad cycles

There isn’t likely going to be a fix unless Google changes something.  You might be able to do something with Enterprise and multi-threading.

Thanks for the quick reply. Is Corona Labs able to communicate with Google (along with other SDK’s which must surely be experiencing the same issues) to resolve this? I imagine this is going to break a lot of games and anger a lot of people, especially if they are paying. Also, if something could be done with Enterprise, then I’m sure it can be implemented into the normal Corona versions. It would surely bring in a lot of users if Corona was the first to be able to deal with this Google screw up. 

Hi Rob,

This sounds nothing like what’s going on with my app.  And if my problem is related to the banner cycles which is likely then an educated guess is it’s not the problem for others either.

Here’s what happens for me:

  1. Show an interstitial ad

  2. ad is seen and closed

  3. fps subsequently drops, for a seemingly random period of time.  Sometimes it’s only a few seconds, sometimes I have to close and open the app because it has dropped for a couple of minutes or more and doesn’t seem like it’s going to pick up again.

I’ve recently been playing a game made from cocos2d and it is littered with the same admob interstitial ads that i use in my game.  I’ve never experienced an fps drop in this game.  Don’t know if it means anything… but …

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.

Unfortunately, the admob v2 didn’t solve the FPS drop.

Corona Labs, any news on that? Can you fix it or is this fully AdMobs fault?

Any chance you will support “normal” banners which doesn’t cause FPS drop?

The way it is now, the FPS drop really gives a bad user experience.

Regards,
Damir.

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.

According to engineering we use “Normal” banners.  According to Google, “Smartbanners” detect the device you are on and provide a size ad based on the device.  “Smart” doesn’t mean “Interactive” “Rich”, “HTML5” or whatever other descriptor.  Their “normal” banners  can be rich ads.  If you need a description of this:

http://v-play.net/doc/plugins1-admob/

So even with Normal banners, you’re going to get these CPU intensive ads.  As Walter pointed out, directly from Google’s docs that you should show ads at times that the ads won’t take away from the presentation.

Rob

OK, seems they are called “Standard banner” (http://v-play.net/doc/plugins1-admob/#standard-banner).

To clarify, we are talking about banners which are always the size of 320x50 and do not re-size depending on the device.

Anyway, I am using them in my game (as described above) in my game “Ultimate Blackjack 3D” written in Java where I could use AdMob SDK and never had ANY FPS issues.

As for the comment that ads should be shown when they don’t take away from the presentation, that could be said for interstitials.

The standard way apps show banners is during the whole game-play, otherwise they do not have any sense.

Regards,
Damir.

Hi Rob,

It seems to me the banners that corona has implemented in their admob plugin are smart banners. If they were actually normal banners, the ads would not stretch across the width of the devices to fill the space but instead would have a fixed dimension (for ex. 320x20). I have many corona apps now and I have seen that the ads do stretch all the way across the screen.

I understand your advice that we should not have an ad running during game play. However, it does seem to be a very standard practice regardless.

Can’t we take a step back here and look at what people are reporting:

* There is a substantial frame rate drop when using the admob plugin to show ads. It is so prominent that it renders apps unusable if there is any kind of movement going on in the scene.
* This is a widespread issue and not isolated to a specific incident

* There have been reports from users who have made NON-corona apps that they do not see this issue when using admob ads.

Clearly this illustrates the point that something wrong is going on with the corona admob plugin. 

I think it would be beneficial for the corona staff to stop denying that there is an issue with their plugin and start investigating/fixing it.

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