Fantastic info. Please also do a how-to for ads on iOS. Also please do tutorials for handling in-app purchases for both iOS and Android. These would be greatly appreciated. Thanks for sharing your knowledge.
Im probably a little late but I want to mention that for testing purposes you can use admob test ads (they provide test ids). If you set up an ad unit (not provided test ones) and its doesn't show you ads it may be because it takes admob some time to process and start serving them to you.
@@Adore_04 As far as I know it may vary depending on region and language but generally I would suggest to wait for around 24 hours. You may also want to look into admob match rates.
@@hafidtalbi Not worries, logcat error code 3 means: Everything is going well but no returning ads for you, this is not your problem it is because of google. If you've created new ads, this is happens in a week they'll be good. I saw this message is 2 month ago, but still some other people need to solve this issue. Actually it is not an issue.
Thanks to you I am going to upload a game to Google Play Store soon. The best tutorials i have ever seen (and i have watched many). Wish you all the best. If it's succesful a donation will follow.
A bit more recent summary of what needs to be done: godotlearn.com/godot-3-2-how-to-integrate-google-ads-admob-for-android/ I ran into some problems with sdkmanager on windows (because I chose not to download the whole Android Studio), sdkmanager didn't navigate folders very well. (I guess it's a kind of a bug, I googled it and lots of people have it.) First, it didn't want to run --licenses or any other command, I needed to specify --sdk_root=path like so: .\sdkmanager --sdk_root=path/to/android-sdk --licenses And that would work... and create the 'licenses' folder in C:\\ instead of android-sdk. Same thing with .\sdkmanager --sdk_root=path/to/android-sdk platform-tools It downloaded everything to C:\\ directly. That made Godot not recognize that I had signed all the licenses. But simple cut-paste on both 'platform-tools' and 'licenses' folders into 'android-sdk' folder solved that.
Super Fantastic tutorial. Very very informative. Is Android uploading different in 3.2? If we want to upload this game in our name, do you have any objections or if we make 80% of your game and upload in our name?
@KidsCanCode, you should make this game all the way through and put it up on the play store. Then you can periodically show us how much your game is making. That would be really entertaining.
setget lets you run code when the variable is changed. Our example here is a perfect one. When the button changes the value of `enable_ads`, we can also make sure that the ads are hidden/shown. Another common example is bounds checking. If we define a setter function for a character's health, we can do: func set_health(value): health = clamp(value, 0, max_health) And then anywhere else in the project, you don't need to check what value you're setting, it will be validated.
@kidsCanCode Im really curious what the design theory is for having, what was it you called it? "interstitial" ads? (thats that occur after you die). Iv seen them in quite a few mobile games but Iv always thought it a really weird place to put an ad (design wise). If the goal is to keep the player playing for more opportunities to show them ads, putting an Ad after they die increases the time between when they can play again, dropping their attention and increasing their likelihood to close the app and do something else. (kinda the opposite of how games with a quick respawn/retry are hard to put down). The best strategy iv seen for getting people to watch ads is in game rewards, eg, watch an ad for a power up, or a bonus, or an extra life. Literally incentivizing the player to watch ads (and pay you). There is a little thought needed on this though as the player needs to feel their time is worth the reward. However the reward also cant be so great that players not using ads would be put at a disadvantage. An example in your game would be, on death, giving the player the choice to watch an Ad for a extra life. When a player "buys" the game and disables ads, they automatically get a extra life every round.
I think the intention is that they're shown at natural breaks in the action. How effective they are is a question of metrics. If you're serious about optimization, you run A/B tests on all your monetization features and see what the numbers tell you. Intuition is often incorrect. Rewarded ads can and do work, I just didn't see a place to put them into this game without increasing complexity. A design goal for this game is to keep it very simple, as it's intended to be a learning platform, not a commercial project.
@@Kidscancode Thank you for the reply! I get this sort of design element was more an instruction of how to put in advertising than the strategies behind it. I just dont see Ad placement there very often. my background is in psychological science and monetization/micro-transaction strategies/theories are somewhat of a pet interest of mine. It was just interesting to see the how and where the advertisements were put (I have been loving your tutorials, please keep up the awesome work).
I've actually seen a lot of free-to-play games putting interstitials at the end of gameplay lately. Sometimes they have them on a counter - once every 3-5 plays, etc.
@@Kidscancode Indeed! it does appear to be new. Kinda why I was so curious, theory stands that it should not be very effective, yet it must be getting some good results for it to be getting some traction.
Hi! It doesn't showing me any ads on my phone, neither giving any error messages, I can toggle the Enable/Disable Ads in the game's settings but nothing is happening... :/ I'm using the current Steam version (3.1.1) on Linux and a Note 8 with Android 9. My guess is it somehow doesn't find the AdMob module, even though I pasted that path and linked the custom debug/release files. Any ideas what might be wrong?
Try running the following in a shell while the phone is connected via USB: adb -d logcat godot:V GoogleService:V DEBUG:V AndroidRuntime:V ValidateServiceOp:V *:S You should see some output like the following, hopefully with an error message somewhere telling you what's happening: 06-14 10:54:25.195 13976 13996 I godot : Loading Android module: org/godotengine/godot/GodotAdMob 06-14 10:54:25.270 13976 13996 I godot : OpenGL ES 2.0 Renderer: Adreno (TM) 540 06-14 10:54:25.952 13976 13996 D godot : AdMob: init with content rating options 06-14 10:54:29.799 13976 13976 W godot : AdMob: onAdLoaded 06-14 10:54:30.168 13976 13976 W godot : AdMob: onAdLoaded 06-14 10:54:35.910 13976 13976 D godot : AdMob: Hide Banner 06-14 10:54:40.033 13976 13976 W godot : AdMob: onAdOpened() 06-14 10:54:45.083 13976 13976 W godot : AdMob: onAdClosed 06-14 10:54:45.180 13976 13976 D godot : AdMob: Show Banner 06-14 10:54:46.566 13976 13976 W godot : AdMob: onAdLoaded
@@Kidscancode Well, I didn't get any error message, but strangely enough after I was following the newer tutorials, went to the settings again on the phone, turned the ads on again, and the ads were there, without me changing any code related to it... Interesting. But at least it's working, thank you again for the great series. :)
i doesn't work so, in the ready func at engine.has_singleton i put an else print("dontwork") and it printed; why godot doesn't have the singleton what i did wrong?
If you're using 3.2, the android plugin system has changed. See github.com/Shin-NiL/Godot-Android-Admob-Plugin for instructions. I have updated my source code so it's working on 3.2.1. I was going to do an updated video, but there's another change coming in 3.2.2, so I'm just waiting for that release.
@@Kidscancode I get the same error. log here, ---- 08-13 14:51:30.534 32428 32453 I godot : Loading Android module: org/godotengine/godot/GodotAdMob 08-13 14:51:42.199 32428 32453 I godot : OpenGL ES 2.0 Renderer: Adreno (TM) 330 08-13 14:51:43.379 32428 32453 D godot : AdMob: init with content rating options 08-13 14:51:49.041 32428 32428 W godot : AdMob: onAdFailedToLoad -> ERROR_CODE_INTERNAL_ERROR 08-13 14:51:49.111 32428 32428 W godot : AdMob: onAdFailedToLoad(int errorCode) - error code: 0 08-13 14:51:49.112 32428 32428 W godot : AdMob: _on_interstitial_not_loaded 08-13 14:52:50.107 32428 32428 W godot : AdMob: onAdFailedToLoad -> ERROR_CODE_INTERNAL_ERROR 08-13 14:53:51.181 32428 32428 W godot : AdMob: onAdFailedToLoad -> ERROR_CODE_INTERNAL_ERROR --- google says, public static final int ERROR_CODE_INTERNAL_ERROR Something happened internally; for instance, an invalid response was received from the ad server. Constant Value: 0 developers.google.com/android/reference/com/google/android/gms/ads/AdRequest#ERROR_CODE_INTERNAL_ERROR -- I did test with public test ad unit IDs, it works fine with test(sample) IDs Ad format Sample ad unit ID Banner ca-app-pub-3940256099942544/6300978111 Interstitial ca-app-pub-3940256099942544/1033173712 developers.google.com/admob/android/test-ads -- Related issues github.com/kloder-games/godot-admob/issues?utf8=%E2%9C%93&q=is%3Aissue+ERROR_CODE_INTERNAL_ERROR+ -- Most probably all we can do is waiting for google to confirm and active the Ad Units, still you can test your code with the sample IDs
Direct dependency on advertising is a great way to annoy your players & show you have no confidence in your product. Anyone reading this, please reconsider & try selling your game. If you just want them to try before they put any money in, release a demo too. In-game advertising is an anathema of the gaming industry along with microtransactions and purchasable time mcguffins. We didn't need it before and if you want happy customers, you don't need it now.
Thanks for your opinion, but I'm not here to make moral judgements. If someone making a game wants to offer it for free and monetize via ads, that's their decision. It's a viable and very common option in the mobile market, which is very competitive and difficult to monetize. If users universally rejected ad-supported games, there would not be so many successful games using that strategy. We might not like it, but it's the reality.
Ads are not bad, but ppl need to learn how to use them and when. Sadly many of "devs" who just started focus on making "money", so theyr game is bad and spammed with ads. I dont mind watching ads when i will get something that will speed up my char evolution etc. Maybe someday we will get something like uBlock for games too;)
First of all no, you are not gaining revenue because you're not paid for requesting ads. Second, if you test with live ads you'll be violating the terms because clicking on your own ads is click fraud. Always read the terms and conditions from your ad provider.
@@Kidscancode are you saying I don't read the terms? Of course I read them, I carefully read through the thing and haven't broken my promise at all! and I'm not going to either!
I'm not saying anything about what you do or don't read. You asked a question and I answered with where you would find the answer, because many people may read this comment thread.
@@Kidscancode just so you know I DID definitely read everything and follow everything as said but just for everyone else arround here, do you have a link to the terms and conditions?
Others would charge money for this knowledge. You are the greatest!
"It is not necessarily for the faint of heart"
Fantastic info. Please also do a how-to for ads on iOS. Also please do tutorials for handling in-app purchases for both iOS and Android. These would be greatly appreciated.
Thanks for sharing your knowledge.
The good news is, this plugin works for iOS as well. It's a bit more involved exporting to iOS, though, as you need access to a Mac with XCode.
Im probably a little late but I want to mention that for testing purposes you can use admob test ads (they provide test ids). If you set up an ad unit (not provided test ones) and its doesn't show you ads it may be because it takes admob some time to process and start serving them to you.
Like how long?
@@Adore_04 As far as I know it may vary depending on region and language but generally I would suggest to wait for around 24 hours.
You may also want to look into admob match rates.
can you help me i added ad unit and i waited 2 days and nothing shows up test ads is showing but real ads not and it display in logcat error code 3
@@hafidtalbi Not worries, logcat error code 3 means:
Everything is going well but no returning ads for you, this is not your problem it is because of google.
If you've created new ads, this is happens in a week they'll be good. I saw this message is 2 month ago, but still some other people need to solve this issue. Actually it is not an issue.
@@tufekcisoftware1086 thanks
can you update this one for 3.2 version of godot ?
Please make a admob tutorial using Godot 3.2.3 Thank you
Thanks to you I am going to upload a game to Google Play Store soon. The best tutorials i have ever seen (and i have watched many). Wish you all the best. If it's succesful a donation will follow.
Android Admob plug-in updated to version 4.0.0 for Godot v3.2.2
github.com/Shin-NiL/Godot-Android-Admob-Plugin
A bit more recent summary of what needs to be done:
godotlearn.com/godot-3-2-how-to-integrate-google-ads-admob-for-android/
I ran into some problems with sdkmanager on windows (because I chose not to download the whole Android Studio),
sdkmanager didn't navigate folders very well. (I guess it's a kind of a bug, I googled it and lots of people have it.)
First, it didn't want to run --licenses or any other command, I needed to specify --sdk_root=path like so:
.\sdkmanager --sdk_root=path/to/android-sdk --licenses
And that would work... and create the 'licenses' folder in C:\\ instead of android-sdk.
Same thing with
.\sdkmanager --sdk_root=path/to/android-sdk platform-tools
It downloaded everything to C:\\ directly. That made Godot not recognize that I had signed all the licenses.
But simple cut-paste on both 'platform-tools' and 'licenses' folders into 'android-sdk' folder solved that.
And now the process is easier in Godot 3.2
Thanks for explaining this! you got yourself a subscriber 👍
Super Fantastic tutorial.
Very very informative.
Is Android uploading different in 3.2?
If we want to upload this game in our name, do you have any objections or if we make 80% of your game and upload in our name?
Thanks for a wonderful tutorial. Can I publish my games on playstore without displaying GRPD CONSENT. And how I can do it with Godot engine
Hello there, just wanted to let you know that the Download link is from Part 10.
Thank you very much for this series. Great content.
Thank you so much. You are a life saver
Thank you so much !!!
@KidsCanCode, you should make this game all the way through and put it up on the play store. Then you can periodically show us how much your game is making. That would be really entertaining.
That will be happening!
@@Kidscancode You're the best!
Are the assest you used for the game royalty free???
Are they royalty free? I mean can I use them in a different game I'm going to make?
Yes
Thank you. Have a good day.
why people use *setget* ?
can you explain me with a simple example ?
setget lets you run code when the variable is changed. Our example here is a perfect one. When the button changes the value of `enable_ads`, we can also make sure that the ads are hidden/shown.
Another common example is bounds checking. If we define a setter function for a character's health, we can do:
func set_health(value):
health = clamp(value, 0, max_health)
And then anywhere else in the project, you don't need to check what value you're setting, it will be validated.
@@Kidscancode Excellent!!! Your health example made me cut off a lot of code in my game! hahaha
Thank you!
Update this if possible. Please
Can we earn with this ads from Google Play Store... If yes what to do for that?
Please can you cover a topic on in-app purchases
Which template should I use in Godot 3.2.2?
@kidsCanCode Im really curious what the design theory is for having, what was it you called it? "interstitial" ads? (thats that occur after you die). Iv seen them in quite a few mobile games but Iv always thought it a really weird place to put an ad (design wise). If the goal is to keep the player playing for more opportunities to show them ads, putting an Ad after they die increases the time between when they can play again, dropping their attention and increasing their likelihood to close the app and do something else. (kinda the opposite of how games with a quick respawn/retry are hard to put down).
The best strategy iv seen for getting people to watch ads is in game rewards, eg, watch an ad for a power up, or a bonus, or an extra life. Literally incentivizing the player to watch ads (and pay you). There is a little thought needed on this though as the player needs to feel their time is worth the reward. However the reward also cant be so great that players not using ads would be put at a disadvantage.
An example in your game would be, on death, giving the player the choice to watch an Ad for a extra life. When a player "buys" the game and disables ads, they automatically get a extra life every round.
I think the intention is that they're shown at natural breaks in the action. How effective they are is a question of metrics. If you're serious about optimization, you run A/B tests on all your monetization features and see what the numbers tell you. Intuition is often incorrect.
Rewarded ads can and do work, I just didn't see a place to put them into this game without increasing complexity. A design goal for this game is to keep it very simple, as it's intended to be a learning platform, not a commercial project.
@@Kidscancode Thank you for the reply! I get this sort of design element was more an instruction of how to put in advertising than the strategies behind it. I just dont see Ad placement there very often.
my background is in psychological science and monetization/micro-transaction strategies/theories are somewhat of a pet interest of mine. It was just interesting to see the how and where the advertisements were put (I have been loving your tutorials, please keep up the awesome work).
I've actually seen a lot of free-to-play games putting interstitials at the end of gameplay lately. Sometimes they have them on a counter - once every 3-5 plays, etc.
@@Kidscancode Indeed! it does appear to be new. Kinda why I was so curious, theory stands that it should not be very effective, yet it must be getting some good results for it to be getting some traction.
does this still work on 3.2.1
the new system doesnt seem to work for me i cant add a custom build location in editor settings can you do a tutorial on this thanx
Hi!
It doesn't showing me any ads on my phone, neither giving any error messages, I can toggle the Enable/Disable Ads in the game's settings but nothing is happening... :/
I'm using the current Steam version (3.1.1) on Linux and a Note 8 with Android 9.
My guess is it somehow doesn't find the AdMob module, even though I pasted that path and linked the custom debug/release files. Any ideas what might be wrong?
Try running the following in a shell while the phone is connected via USB:
adb -d logcat godot:V GoogleService:V DEBUG:V AndroidRuntime:V ValidateServiceOp:V *:S
You should see some output like the following, hopefully with an error message somewhere telling you what's happening:
06-14 10:54:25.195 13976 13996 I godot : Loading Android module: org/godotengine/godot/GodotAdMob
06-14 10:54:25.270 13976 13996 I godot : OpenGL ES 2.0 Renderer: Adreno (TM) 540
06-14 10:54:25.952 13976 13996 D godot : AdMob: init with content rating options
06-14 10:54:29.799 13976 13976 W godot : AdMob: onAdLoaded
06-14 10:54:30.168 13976 13976 W godot : AdMob: onAdLoaded
06-14 10:54:35.910 13976 13976 D godot : AdMob: Hide Banner
06-14 10:54:40.033 13976 13976 W godot : AdMob: onAdOpened()
06-14 10:54:45.083 13976 13976 W godot : AdMob: onAdClosed
06-14 10:54:45.180 13976 13976 D godot : AdMob: Show Banner
06-14 10:54:46.566 13976 13976 W godot : AdMob: onAdLoaded
@@Kidscancode Well, I didn't get any error message, but strangely enough after I was following the newer tutorials, went to the settings again on the phone, turned the ads on again, and the ads were there, without me changing any code related to it... Interesting. But at least it's working, thank you again for the great series. :)
You can create tutorial for unity ads ? Please. from Brazil
Sorry, I don't work with Unity.
@@Kidscancode Is for Godot. I can not make this module, I need much more did not understand the step by step :( github.com/FrogSquare/GodotAds
AdMob says to take note of the App ID, but we didn't seem to put it anywhere in the code or am I missing something?
You only need the ad unit IDs for showing in your game.
how do you remove the little "Test Ad" label which is on your the banner at 10:48
That label appears when you have your app in test mode. It goes away when you start serving real ads.
@KidsCanCode Right. Thats what I did, the real ads are online, but the "Test Ad" sign is still there. The App is Not published yet
i doesn't work so, in the ready func at engine.has_singleton i put an else print("dontwork") and it printed; why godot doesn't have the singleton what i did wrong?
If you're using 3.2, the android plugin system has changed. See github.com/Shin-NiL/Godot-Android-Admob-Plugin for instructions. I have updated my source code so it's working on 3.2.1.
I was going to do an updated video, but there's another change coming in 3.2.2, so I'm just waiting for that release.
@@Kidscancode ok thanks a lot man
I do have this error AdMob: onAdFailedToLoad -> ERROR_CODE_INTERNAL_ERROR an no ads are displayed.... any idea?
Have you checked the android error log with "adb logcat"?
@@Kidscancode
I get the same error. log here,
----
08-13 14:51:30.534 32428 32453 I godot : Loading Android module: org/godotengine/godot/GodotAdMob
08-13 14:51:42.199 32428 32453 I godot : OpenGL ES 2.0 Renderer: Adreno (TM) 330
08-13 14:51:43.379 32428 32453 D godot : AdMob: init with content rating options
08-13 14:51:49.041 32428 32428 W godot : AdMob: onAdFailedToLoad -> ERROR_CODE_INTERNAL_ERROR
08-13 14:51:49.111 32428 32428 W godot : AdMob: onAdFailedToLoad(int errorCode) - error code: 0
08-13 14:51:49.112 32428 32428 W godot : AdMob: _on_interstitial_not_loaded
08-13 14:52:50.107 32428 32428 W godot : AdMob: onAdFailedToLoad -> ERROR_CODE_INTERNAL_ERROR
08-13 14:53:51.181 32428 32428 W godot : AdMob: onAdFailedToLoad -> ERROR_CODE_INTERNAL_ERROR
---
google says,
public static final int ERROR_CODE_INTERNAL_ERROR
Something happened internally; for instance, an invalid response was received from the ad server.
Constant Value: 0
developers.google.com/android/reference/com/google/android/gms/ads/AdRequest#ERROR_CODE_INTERNAL_ERROR
--
I did test with public test ad unit IDs, it works fine with test(sample) IDs
Ad format Sample ad unit ID
Banner ca-app-pub-3940256099942544/6300978111
Interstitial ca-app-pub-3940256099942544/1033173712
developers.google.com/admob/android/test-ads
--
Related issues
github.com/kloder-games/godot-admob/issues?utf8=%E2%9C%93&q=is%3Aissue+ERROR_CODE_INTERNAL_ERROR+
--
Most probably all we can do is waiting for google to confirm and active the Ad Units, still you can test your code with the sample IDs
Do I have the right to publish the game? If not, can I just change a bit and publish it?
Bro can you make a video on (In-App Purchase). Please!
Will this work for apple
Indeed, but exporting for iOS is a bit more involved, so I'm saving that until last.
KidsCanCode thank you!
Direct dependency on advertising is a great way to annoy your players & show you have no confidence in your product. Anyone reading this, please reconsider & try selling your game. If you just want them to try before they put any money in, release a demo too. In-game advertising is an anathema of the gaming industry along with microtransactions and purchasable time mcguffins. We didn't need it before and if you want happy customers, you don't need it now.
Thanks for your opinion, but I'm not here to make moral judgements. If someone making a game wants to offer it for free and monetize via ads, that's their decision. It's a viable and very common option in the mobile market, which is very competitive and difficult to monetize. If users universally rejected ad-supported games, there would not be so many successful games using that strategy. We might not like it, but it's the reality.
@@Kidscancode I understand, mate. I didn't expect a warm welcome here. This is just here for people to reconsider that decision.
Ads are not bad, but ppl need to learn how to use them and when. Sadly many of "devs" who just started focus on making "money", so theyr game is bad and spammed with ads. I dont mind watching ads when i will get something that will speed up my char evolution etc.
Maybe someday we will get something like uBlock for games too;)
Make a in app purchase too.
Please.. :)
Works in Godot 3.2.2?
No, the plugin will change for 3.2.2. I haven't tried it out yet, but I know the author is working on it.
@@Kidscancode, ok. Thanks!
It doesn't show interstitial...
Are banners working? Check your device's error log for more information.
@@Kidscancode yes banner works only on launch but doesn't show when I return to home after game over...?
@@Kidscancode sorry I took long, thought you'd never reply
Checked the logs I think I found the problem
why is it you're not supposed to test with real ads? you're only gaining revenue by requesting ads, right?
First of all no, you are not gaining revenue because you're not paid for requesting ads. Second, if you test with live ads you'll be violating the terms because clicking on your own ads is click fraud.
Always read the terms and conditions from your ad provider.
@@Kidscancode are you saying I don't read the terms? Of course I read them, I carefully read through the thing and haven't broken my promise at all! and I'm not going to either!
I'm not saying anything about what you do or don't read. You asked a question and I answered with where you would find the answer, because many people may read this comment thread.
@@Kidscancode just so you know I DID definitely read everything and follow everything as said but just for everyone else arround here, do you have a link to the terms and conditions?