My experience about making game and upload to google play with godot engine

in #gamedev6 years ago

So after getting a developer account, I immersed myself in learning, testing google play api and ways to earn money with games.

Why I choose Godot engine?
-Because it is the most suitable engine that I have experience according to my laptop specs, exporting, easy gd code...
but there are still some disadvantages when using those. Sometimes, there are some difficulties that I almost buying construct 3. (because construct 3 have plugins and easy to use without code)
After digging information in the internet for some time,

I decided to use the following module/api:

Seem a really reasonable start kit for earning on google play on game with godot engine.

Well, the first problem is You have to compile android export template in order to use the first 2 modules.

I followed the godot docs and got a lot of problems since I use old sdk, ndk .
The ndk I use is r16b, sdk and related tool I install from Android studio sdk manager, jdk1.8.0_77 version, and other from their own website. I use Godot engine 3.02 source code.
The problem is I have test several ndk but r16b work for me.

The godot source code version, and the Godot Engine must be the same.
[error] NOT ACTUALLY AN ERROR but when you export android game to google play a bunch of permission start with godot appear and it may get your app removed. There are 3 three ways to fix it according to godot engine news page:this https://godotengine.org/article/godot-apk-fixer-tool not work for me.
So I must edit the godotsource\platform\android\AndroidManifest.xml.template remove all permission and add suitable permission.
In my case : <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="com.android.vending.BILLING"/>
and also do this to the godotsource\platform\android\java\AndroidManifest.xml file or it may be not work. -_-

[error] Compiling: if use more than 1 modules:

  • Something like com.google.android.gms.{something or not}: the number version here should be the same for each modules ( in config.py file)
  • /android/AndroidManifestChunk.xml : if the second line is the same on 2 modules : <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/> then should remove it in one modules.
  • I also meet other error too, but it's solved after searching in google.
After that I copy the 2 apk template file path to Godot engine android export setting and put it in custom package/debug,release.

[error] When exporting to android:

  • Should export a dummy project to test on android if it works or not.
  • It didn't work the app stop: I experience this error because of the template not compatible with the godot engine version.

After succeed that, I use the modules:
If it is more than 1 modules then add this to project.godot file
[android]
modules="{module1},{module2}"
in my case: modules="org/godotengine/godot/GodotAdMob,org/godotengine/godot/GodotPlayGameServices,org/godotengine/godot/GodotPaymentV3"

After all this, I can get singleton from those module but can only test it on android.

I didn't get lots of problem when use the admob, but the google play games is hard since it's a lot of things to add to my game.
So first, I add a new game in gameservice and fill in and later create app and link app to the gameservice (it's game but it's call app?)
[error] when request google play service sign in app stop suddenly.

  • Probably the game service not link to an api project, and it even need a Credentials OAuth 2.0 client IDs thingy.
  • This is later become a problem for me when I choose Google Play App Signing enabled. I have to change the sha1 in the OAuth 2.0 .... or it will crash when sign in.

The other things in google play games api is save game. Now, godot get error when get screen shot of game on android. So I can't capture the screen and use it as an image in saveslot. And the only image can use is the godot icon.png. Except You change the image to *.share and include it in the export setting and later dir.copy it to the png file in user folder.(I found this solution from someone from the github)
The savegame data is a string. Yes. A string.
Therefore, after load it I have to change it to the correct type like :
is_dead = bool(currentline["is_dead"]). This is happens with normal save game on local too if you follow the docs or maybe it only happens to me.

That's it for google play games. now to in-app purchase.
The game must be public at least to alpha to test it.
[error] can't retrieve information:

  • public it to alpha first (save, review -> roll out) and wait until the alpha test link appear. Click on the link to go to google play store and download and test.
    [error] publisher can't buy:
  • create another account -> remove publisher account from android->sigin in new account -> uninstall app -> download again. or maybe just use another device with only test account sign in.

My google console work flow : game service ->add game (fill) ->api project ->enable some services and create Ooath -> all application->add app(fill) ->link app to game-> test things except in app purchase -> alpha ->test in app -> alpha / beta ..-> release

Back to admob: GDPR notice require I somehow pull the 12 ad providers list and add a notice by Label and button on godot. -_- .

That finish it. Maybe it took me 14 days to get all of this.

Thanks for reading it and sorry for my bad English.

--WAITING FOR GODOT ENGINE 3.1---

Sort:  

Congratulations @vhhau! You have received a personal award!

SteemitBoard World Cup Contest
Click on the badge to view your Board of Honor.

Do not miss the last post from @steemitboard:
SteemitBoard World Cup Contest - The results, the winners and the prizes

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @vhhau! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:
SteemitBoard World Cup Contest - The results, the winners and the prizes

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @vhhau! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Coin Marketplace

STEEM 0.18
TRX 0.13
JST 0.028
BTC 57050.09
ETH 3060.34
USDT 1.00
SBD 2.32