Hello friends! In this article, I will guide you to export the game to Console platforms such as Windows, Linux, MacOS, … and the mobile platform is Android! The goal is for players to install and play the game you designed.
Join the channel Telegram of the AnonyViet π Link π |
Before Export create a simple Hello World program like this:
1. Windows
First you go to Project -> Export
Next, choose Windows Desktop!
You fill in basic information such as Game name, version (version), game icon, 64 or 32 bit chip architecture
Then choose the save path and Export!
Note that when the export is done, there will be 2 files, .exe and .pck. You must put these 2 files with the same path to run the game!
2. Linux
You still go to Project -> Export and select Add for yourself Linux!
The Linux side is simpler. You don’t need to enter basic information, just select the path and export it directly!
Just like Windows. Linux also outputs 2 files, .x86_64 and .pck. And make sure you put these 2 files in the same folder. To run the game on linux, you execute 2 commands as follows:
1 is to grant file permissions: chmod +x
2 is to run the game: ./
3. MacOS
You go to Project -> Export and Add MacOS
Then fill in the following basic information:
Where Identifier is a symbol (identifier) ββto distinguish applications on MacOS
After entering the basic information, you choose the path to Export, but it will be in .dmg format!
For Windows or MacOS you just click and launch normally!
4. Download Export Template
The necessary condition to Export Game is that you must download the Export Template!
First you go to Editor -> Manage Export Template
Method 1: You download directly from Godot Engine
Method 2: You download the compressed package from the website
When the download is complete, select Install From File!
When completing the installation of Export Template, the interface will look like this:
5. Android
First you download Android Studio here: https://developer.android.com/studio
Then download JDK here (recommended to use jdk 8): https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
When the download is complete, install Android Studio and JDK on your device
Next you need to create the debug.keystore file with the command below:
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
For Windows, you use cmd and Linux and MacOS use Terminal (Note: To run the keytool channel, you must successfully install jdk)
Once the command is executed successfully, you will get the debug.keystore file in your personal storage directory (USER).
To export the game on Android (.apk) you need:
- adb SDK from Andorid Studio
- jarsigner from JDK
- debug.keystore
Now we have 3 of the above. Just proceed to setup for Godot.
Go to Editor -> Settings -> Android. Choose the path to the 3 files above!
That way you are ready to export to Android!
You go to Project -> Export, select Add Android and fill in the basic information like the export methods above!
Once imported, proceed to select Export.
You can also enable developer mode on your phone, plug in the cable and export directly!
Note before exporting you must set up the viewport correctly for the device! Refer to previous articles for more information.
This article also wraps up my basic Godot Engine series! Thank you for taking the time to watch!
Video export android: https://www.youtube.com/watch?v=BBwhDVIx_5M