Skip to content

Repository files navigation

A Godot project exported through Godot Mini Game to WeChat, Douyin, and TikTok Mini Games

Godot Mini Game

Export Godot games to WeChat, Douyin, and TikTok Mini Games.
CI-validated WASM engine · guarded export transaction · one versioned GDScript SDK

Latest release Export tests Godot 4.6.1 MIT license

Download latest → · Website · Quick start · API reference · 简体中文


Godot Mini Game turns a normal Godot project into a platform-ready WeChat, Douyin, or TikTok Mini Game package. Day-to-day export does not require Node.js, Brotli, Emscripten, or a separate Godot Web template download.

Why Godot Mini Game?

Editor-native workflow
Build the PCK, assemble platform files, validate, and publish from one Dock.
Exact template identity
Godot source, Emscripten, profile, revision, schemas, features, and hashes stay aligned.
One capability-gated SDK
MiniGameSDK exposes 224 methods and 83 signals over wx, tt, and TTMinis.game; availability still depends on the selected host.
Guarded publishing
Staging, ownership manifests, hashes, an output lock, backup, and rollback protect managed paths while preserving sidecars.

Architecture

Architecture: one selected wx, tt, or TTMinis.game target passes through the exact template gate, sibling staging, manifest, hash, lock, and managed-path publish; the exported game then uses one PlatformRuntime provider, the GodotSDK to MiniGameSDK Bridge ABI, and an exact-identity release gate

Click the diagram to open it at full size.

  • Export control plane — each transaction selects WeChat, Douyin, or TikTok Native, resolves one complete engine bundle, assembles outside the destination, validates every managed artifact, and publishes under a lock.
  • Exported package runtimegame.js selects exactly one PlatformRuntime provider; the loader starts the patched engine and PCK, while GodotSDK and MiniGameSDK negotiate the Bridge ABI.

The publish step has in-process rollback and records recovery evidence, but is not a filesystem-wide crash-atomic primitive. Full boundaries are documented in Architecture and versioning.

Validated compatibility

Contract Bundled value
Plugin release v0.3.0
Godot 4.6.1.stable · commit 14d19694e0c8
Emscripten 4.0.3
Build 2d_full · release · revision 1
Runtime contract Bridge ABI 1 · template schema 1 · output schema 1
  • WeChat Mini Game (wx) — full export, manifest, WASM, and package checks.
  • Douyin Mini Game (tt) — full export, manifest, WASM, and package checks.
  • 🧪 TikTok Mini Game Native (TTMinis.game) — first-class beta target with automated export checks. Requires TikTok client 43.4.0+, ttmg DevTool compilation, and real-device validation before release.

Important

The bundled engine is validated by this project only for the exact identity above. Another Godot editor build requires a matching template pack. Automated checks do not replace final testing in platform DevTools and on target devices.

TikTok support in v0.3 is for the Native runtime and writes lower-case subpackages; Douyin continues to require subPackages. The TikTok HTML runtime is outside this release's scope.

For the first TikTok run, complete ttmg setup and ttmg login, enter the export directory, run ttmg init with the same Client Key, then run ttmg dev. The pinned CLI does not copy project.config.json.appid into ~/.ttmgrc; skipping init results in Missing clientKey.

TikTok Native shortcut and entrance missions have typed SDK wrappers: add_shortcut(), get_shortcut_mission_reward(), start_entrance_mission(), and get_entrance_mission_reward(). Each call is capability-gated before the host API runs and reports through tiktok_mission_result.

Current TikTok beta builds fail closed for storage enumeration, battery reads, and public file-system writes where real-device host calls can crash or hang. Key-value storage get/set/remove remains supported and device-verified; see the usage guide for the exact boundary.

support-matrix.json is the release, CI, and website source of truth for validated identities and platform status.

Quick start

1 · Install the release asset

Open the latest release, download godot_mini_game_vX.Y.Z.zip from Assets, and extract it into the root of your Godot project. Do not use GitHub's generated source archive.

your_project/
└── addons/
    └── godot_mini_game/
Install from source for development
git clone https://github.com/AnranS/godot_for_minigame.git
mkdir -p your_project/addons
cp -R godot_for_minigame/addons/godot_mini_game your_project/addons/godot_mini_game

2 · Enable the plugin

Open Project > Project Settings > Plugins and enable Godot Mini Game Export.

3 · Add a Web preset

Open Project > Export and add a Web preset. Its name is up to you; the standard Web export templates do not need to be downloaded.

4 · Export

Open the Mini Game Export Dock, then select one platform, enter the App ID, or TikTok Client Key, choose an orientation, Web preset, and dedicated output directory, and click Export. Open the result in the matching platform DevTools.

SDK in 60 seconds

MiniGameSDK is registered as an Autoload. Async calls return through signals; methods remain safe to call while developing outside a mini-game runtime.

MiniGameSDK.login_completed.connect(func(code: String, error: String) -> void:
    if error.is_empty():
        print("login code: ", code)
)
MiniGameSDK.login()

MiniGameSDK.storage_set("level", "5")
var level := MiniGameSDK.storage_get("level", "1")
MiniGameSDK.show_toast("Level %s" % level, "success")

At startup the SDK verifies the bridge brand, global name, ABI, and required methods before lifecycle binding. Inspect bridge_info and bridge_initialization_error when diagnosing integration issues.

Browse all 224 methods and 83 signals →

The reference is the complete bridge surface, not a claim that every method is available on every host. Shared names use capability gating; payment and other platform-specific features use explicit provider mappings.

Documentation

I want to… Read
Install, configure, and export a game Usage guide
Find an SDK method or signal Searchable API reference
Understand transactions and versioning Architecture and versioning
Build or import another engine pack Custom template guide
Publish a new plugin version Release process
Report a problem or request a feature GitHub Issues

Chinese documentation: 使用指南 · 中文首页

Contributing

Issues and pull requests are welcome. Keep platform-specific behavior behind the shared runtime and bridge contracts, and run the export test suite before submitting a change. Maintainers should follow the immutable release process.

License

The plugin is available under the MIT License. The bundled Godot engine retains its upstream notices; see GODOT_COPYRIGHT.txt and THIRD_PARTY_NOTICES.md.

About

Godot 4 plugin for exporting games to WeChat and Douyin mini games

Resources

Stars

38 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages