SamuZai
Octodemy
Octodemy

patreon


Building your games with Godot (+android)

Video : https://www.youtube.com/watch?v=JPL4-rXZNW8

To build your games in Godot you need to install what Godot calls build templates.

Open it inside `Editor -> Manage Export Templates`

These are just the build tools used to compile the game.

Installing them is merely unpacking the files inside a local godot folder.

The build tools take about 1.3 gigs of space and there are currently no way to change the location of them. They are installed in your system OS drive.

They are also specific to each Godot version. So each version of Godot needs its own tools.

One way to save space is to delete the build tools for the platforms you don't need.

Open the folder they are in, and just delete the tools you don't plan to use. This simple trick can save a lot of space.

Here is what it looks like:

Also, don't forget to delete the tools you don't need anymore after updating Godot.

To finally export your game, go to `Project -> Export`, add your desired platform and press `Export Project`.

HTML and itch.io

To export a html game to itch.io, you need to save your game as index.html.

After it is build, select all the files and zip them inside a single file.

If you are running godot 4.0.0~4.2.2 you also need to enable `SharedArrayBuffer support` for it to run.

Starting from Godot 4.3 you don't need that anymore, and it is recommended you don't activate that option. As Mac and iOS devices won't run html games if that option is enabled.

Running remote play

After adding an export platform to Godot, it'll enable the remote play button.

This can be used to automatically run your game inside the current platform.

In HTML games, it'll run a webserver and open your default browser to play the game

Android builds

Android builds are a bit more complicated to setup. As they are quite a few more requirements to setup.

You can follow the offical guide here.

The recommended way is to download java openJDK. and AndroidStudio, and use android studio built-in package manager to download the required packages.

But I personally don't like that, android studio is a 1gb+ software that you not going to use, and it'll just increase the bloat of you PC.

What you can do instead is download only the required tools.

To manually install it is a bit more complicated because there is no direct link to download the build tools that I could found. What you need to do is:

That will download all the files you need for the AndroidSDK without the androidStudio software.

Android setup paths

To properly compile the game in Godot you need to go to `Editor-> Editor Settings ` and inside Editor - Android. You need to set the paths for the android SDK and the openJDK folder.

As well as the debug keystore.

The debugkeystore can be generated using the keysign tool that is inside the openJDK folder

with this command

`keytool -keyalg RSA -genkeypair -alias androiddebugkey -keypass android -keystore debug.keystore -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999 -deststoretype pkcs12`

This will generate a debug.keystore file with the username 'androiddebugkey' and pass 'android'

Now you can go to the export menu and add the android platforms. If anything is missing you'll get a red message saying what went wrong.

And if you set the android platform as "Runnable". Godot will start an adb server to look for connected devices. If there are any, you'll be able to run a remote play with them.

End

That's it. A very rushed overview of how to make build for android.

I haven't really reviewed much. But those steps above work here for me.

But for most, it's probably just to use android studio package manager and follow the official guide.

Building your games with Godot (+android) Building your games with Godot (+android)

More Creators