divers Posted July 10, 2017 Share Posted July 10, 2017 Hello! I have developed small game and I wanted monetized it. But there is a one big problem... Admob plugin(cordova) makes the game laggy at the beggining. I am looking for a solution long time, tried different plugins, the result was the same. Can anyone help me? I tried use webworkers but i couldn't fit the code to it. Thanks! Link to comment Share on other sites More sharing options...
bruno_ Posted July 10, 2017 Share Posted July 10, 2017 What kind of ad makes your game laggy? interstitial or banner? In what devices are you testing? Can you see if my game (in the signature) is also laggy with the ads? Link to comment Share on other sites More sharing options...
divers Posted July 10, 2017 Author Share Posted July 10, 2017 My problem is connected with banner, i didnt test interstitial. I was testing on xiaomi mi5, huawei p8 lite and some samsung, but always with the same effect. I cant see lags in your game, because it shows in menu without any animations It looks like something is loading with fps dropdown and after that everything is normal(almost). Link to comment Share on other sites More sharing options...
bruno_ Posted July 10, 2017 Share Posted July 10, 2017 Don't know exactly what causes that, but try to test with my parameters (I use admob pro for cordova): AdMob.createBanner({ adId: 'xxxxxxxxx', overlap: true, offsetTopBar: false, position: AdMob.AD_POSITION.BOTTOM_LEFT, bgColor: '#000000', autoShow: false }); Let it create first, and on the next menu, show it: AdMob.showBanner(AdMob.AD_POSITION.BOTTOM_LEFT); If you play "Penalty Cup" in my game the banner ad is still there while playing. I don't have many animations in the game, but it should give you a general idea. Link to comment Share on other sites More sharing options...
divers Posted July 10, 2017 Author Share Posted July 10, 2017 Already tried it yesterday, result the same. https://github.com/floatinghotpot/cordova-admob-pro/wiki/Known-Issues-&-Solution---Workaround There is a post about my problem but i need to find solution :/ Link to comment Share on other sites More sharing options...
bruno_ Posted July 10, 2017 Share Posted July 10, 2017 I think the best option for now is to show banners only in menus. Link to comment Share on other sites More sharing options...
divers Posted July 10, 2017 Author Share Posted July 10, 2017 Yeah I know but my menus are all animated, thats a problem I see two options: - use webworkers(i dont know how) - or use native admob for java Some other suggestions? Link to comment Share on other sites More sharing options...
bruno_ Posted July 10, 2017 Share Posted July 10, 2017 Are you using admob pro plugin for cordova? That's already native java, the JavaScript part is only the bridge. Web workers won't help because the ad is not on the Webview. Do you use crosswalk? It will help in android versions earlier than 7. Link to comment Share on other sites More sharing options...
divers Posted July 11, 2017 Author Share Posted July 11, 2017 I use https://cocoon.io/ with simple webview. Crosswalk add extra 18mb, since my game weight is about 2mb... Link to comment Share on other sites More sharing options...
bruno_ Posted July 11, 2017 Share Posted July 11, 2017 3 hours ago, divers said: I use https://cocoon.io/ with simple webview. Crosswalk add extra 18mb, since my game weight is about 2mb... Try to use crosswalk just to compare the performance of both. Link to comment Share on other sites More sharing options...
Recommended Posts