Godot setup
The Godot repository contains two
parts. extension/ is the reusable bridge that exposes TTX interfaces as Godot
classes. demo/ contains the image lab and its providers. Build the lab to explore
the complete example, or build the bridge on its own for another project.
Trying the demo
The browser lab runs the CPU and GDScript providers without a local installation. To run it locally, build the lab from source using the instructions below. The extension SDK is the download for projects that want to use TTX with their own providers.
Installing the build tools
The commands below build the Linux extension from the 0.1.0 release. Install Git, Python 3, Bazel 9.2 and Godot 4.7 or later. The standard Godot editor can run the project. Check that the tools are available from your terminal:
git --version
python3 --version
bazel --version
godot --version
The development setup guide covers Bazel installation. Bazel acquires the compiler, target SDKs and library dependencies selected by the project.
Building and running the lab
git clone --branch v0.1.0 https://github.com/tetrodotoxin-dev/Godot.git godot
cd godot
demo/run.sh --cpu
The launch script builds the addon, installs it under demo/addons/godot_ttx/,
imports the project's resources and starts the scene. To run the CUDA providers,
install a compatible NVIDIA driver and use demo/run.sh without --cpu. The
build acquires and packages its CUDA compiler and FFT libraries.
To build without starting the application:
bazel build //demo:addon --config=release
demo/install.sh demo
Add --config=cuda to the build command to include the CUDA providers. For a
debug build, use --config=debug, or run CONFIGURATION=debug demo/run.sh --cpu.
Opening the project in Godot
Import demo/project.godot through Godot's Project Manager, or run
godot --editor --path demo after installing the addon. Open lab.tscn and press
F6 to run that scene. F5 runs the project's main scene.
Begin with the CPU and GDScript cards. Change the source or move the overlay and compare their images. The overlay controls exercise provider replacement and incremental updates through the same image contracts.
Godot's editor introduction covers the scene tree, Inspector and other editor controls. Native extension libraries are loaded when the project opens, so restart the editor after rebuilding and installing them.
Editing GDScript in VS Code
Install Godot Tools
and open demo/ as a VS Code folder. Keep the project open in Godot so its
language server can answer the editor's questions. Godot's
external editor guide
shows how to select VS Code as the script editor.
C++ work belongs in the repository root, where Bazel can find MODULE.bazel.
Use the native tools described in development setup.
Building only the bridge
bazel build //extension:addon --config=release
The resulting .bin/bin/extension/godot_ttx.tar contains the bridge and its
shared runtimes. The complete lab addon is
.bin/bin/demo/godot_ttx.tar. Continue with
using the extension in your project to
install the SDK in your project. Browser build instructions cover Web export.