Skip to content

Latest commit

 

History

566 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kanama logo

Kanama

Kotlin for Godot through a GDExtension runtime powered by the JVM and the Foreign Function & Memory API.

License: MIT Godot 4.7.2 stable JDK 25+ Android: supported iOS: supported Web: experimental Status: 0.4.0 preview

Kanama lets Kotlin scripts attach to Godot nodes through a GDExtension runtime. In the Godot editor, Kanama .kt files appear as script resources and can be attached directly to nodes like .gd scripts. Kanama aims to preserve the Godot workflow while giving game code access to Kotlin, Gradle, coroutines, and the JVM ecosystem.

Related Projects

Kanama is a preview-stage (0.4.0) project using a Panama/FFM-based GDExtension architecture. If you want a more established Kotlin integration for Godot today, also evaluate Godot Kotlin/JVM. It is a separate project with a different runtime and export model.

Status

Kanama is desktop-first. The badges above are the current platform tiers; Version Support is the one page that records what each tier was validated on, when, and with which caveats, and it is the only page that states requirements. Exported desktop games are unpack-and-play: they ship a bundled, jlink-trimmed JVM runtime, and that runtime is cross-target, so one host can produce Windows, Linux, and macOS builds — see Desktop and Packaging.

Highlights

  • Kotlin scripts attach to Godot nodes like GDScript
  • No engine fork, no engine module, no JNI glue in game code
  • Desktop runtime powered by the JDK Foreign Function & Memory API
  • Android runtime through Godot's Android plugin AAR flow (ART + PanamaPort)
  • iOS runtime through a Kotlin/Native .xcframework, no on-device JVM
  • Kotlin/Wasm Web backend through a generated proxy and a versioned JavaScript bridge, no on-device JVM
  • Hot reload and editor build tools for a fast iteration loop
  • Full Godot 4.7 class coverage (1036/1036 wrapped classes, generated KDoc from Godot docs; engine virtuals overridable via @OverrideVirtual)

Requirements

The Godot pin and JDK are the badges above. The full list — per workflow, and per export platform — lives once, in Version Support → Requirements.

Quick Start

Use a source checkout for the current public onboarding path:

git clone https://github.com/falcon4ever/kanama
cd kanama
./gradlew createStarterProject \
  -PkanamaStarterProjectDir=/path/to/kanama-starter
./gradlew installAddonJar \
  -PkanamaProjectDir=/path/to/kanama-starter \
  -PkanamaProjectScriptsDir=/path/to/kanama-starter

Open kanama-starter/project.godot in Godot and press Play. After editing kotlin-src/HelloScript.kt, press Build Scripts in Godot or rerun ./gradlew buildScripts.

Package tasks can also build local desktop kit and store-addon zips for smoke testing:

./gradlew packageDistributions

If a matching GitHub zip release exists, a release kit can be used for a new project:

unzip kanama-desktop-kit-v<version>-<platform>.zip -d kanama-starter
cd kanama-starter
./gradlew buildScripts

For an existing Godot project and a locally built or published store-addon zip, unzip it at the project root, then initialize the project:

sh addons/kanama/setup-kanama-project.sh
./gradlew buildScripts

The release-kit and store-addon pages describe those generated zip shapes; they become download flows once matching release artifacts are published.

Example

package com.example.game

import net.multigesture.kanama.annotations.OnReady
import net.multigesture.kanama.annotations.ScriptClass
import net.multigesture.kanama.api.GD
import net.multigesture.kanama.api.GodotHandle
import net.multigesture.kanama.api.KanamaScript
import net.multigesture.kanama.api.Node

@ScriptClass(attachTo = "Node")
class HelloKanama(godotObject: GodotHandle) :
    KanamaScript<Node>(godotObject, ::Node) {
    @OnReady
    fun ready() {
        GD.print("Hello from Kotlin")
    }
}

Documentation

The latest public documentation is published at falcon4ever.github.io/kanama.

To preview documentation changes locally:

pip install -r docs/requirements.txt
mkdocs serve

Demos

The companion demo repository is falcon4ever/kanama-demos. Keep it beside this checkout:

dev/
  kanama/
  kanama-demos/

Current demo ports cover starter kits, official Godot demos, and GDQuest 3D controller demos. The demo repo is also where new wrappers are validated against real gameplay before release.

Contributing

See CONTRIBUTING.md.

License

MIT. See LICENSE.

About

Kanama brings Kotlin to Godot through a GDExtension runtime powered by the JVM and the Foreign Function & Memory API.

Resources

Contributing

Stars

15 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages