To build our module, you need to same dependencies as the ones described in the official Godot documentation.
To build godot 3 version on Windows you need scons < 4.2.0.
Make sure that Java is installed and its PATH set in your system as well (at least Java 9 is needed!).
Clone godot repo with the stable tag you want to develop for (3.5.2-stable in this example).
git clone email@example.com:godotengine/godot.git 3.5.2-stable --recursive
godot-rootdir, run the following command:
git submodule add firstname.lastname@example.org:utopia-rise/godot-kotlin-jvm.git modules/kotlin_jvm
godot-rootdir, build the engine with our module:
scons -j$(nproc) platform=x11 # your target platform
- navigate to
- create embedded JVM:
- For amd64 systems:
jlink --add-modules java.base,java.logging --output jre-amd64
- For arm64 systems:
jlink --add-modules java.base,java.logging --output jre-arm64
- If you want to remote debug add module
- If you want to enable jmx, add
- navigate to
In order to run the engine, run
godot.x11.tools.64located in the
In order to debug your JVM code, you should start Godot with command line
XXXXstands for the JMX port of you choice. You can then setup remote debug configuration in Intellij' IDEA.
Important things to note:
When you build a sample, it generates a
build/libs. This jar is needed by the engine to function correctly. You need to copy this jar to
<godot-root>/bin. If you want to automate that, consider using the following gradle task in the samples
build.gradle.kts- but don't commit it!
1 2 3 4 5 6 7 8 9 10 11 12 13
If you build the libs from
<module-root>/kt then this copy task is already present and executed automatically for you.