Skip to content

lonewolftechnology/godot-dojo

Repository files navigation

Godot Dojo

Godot Dojo is a cross-platform GDExtension for the Godot Engine, providing seamless integration with Dojo-based backends and blockchain entities. Powered by Rust and C++, it enables advanced networking, subscriptions to blockchain events, and a set of utilities for interacting with decentralized data models directly from Godot.

Note: During the development of this project, the dojo project used for the demo can be found here.


📋 Table of Contents


✨ Features

  • Multi-platform: Build for Linux, Windows, MacOS, and Web (WASM).
  • Blockchain subscriptions: Create and manage event/entity subscriptions from Godot.
  • Rust & C++ core: High-performance native integration.
  • Pluggable demo: Includes a simple demo scene showcasing basic usage.
  • 📄 See also: Project State & Support Matrix

🛠️ Build Instructions

Prerequisites
  • Godot Engine 4.x
  • Rust
  • SCons
  • A C++17 compatible compiler (e.g., GCC, Clang, MSVC)
  • Python (required for SCons)
  • pkg-config and libdbus-1-dev (on Linux)
Dependencies

Important: We are currently building against Godot 4.3, but 4.2.2 should be supported for a while. If you want to build against 4.2.2, you need to checkout the godot-4.2.2 branch of the godot-cpp submodule. Please submit an issue or PR if you find any problems.

Warning: The provided Makefile is not compatible with Windows. To build on any platform (Linux, Windows, MacOS, WebAssembly) always use SCons (scons ...) as described in the build instructions below. SCons is cross-platform and the recommended way to build this project.

Step-by-step

  1. Clone the repository:

    git clone --recurse-submodules https://github.com/lonewolftechnology/godot-dojo
    cd godot-dojo
  2. Verify and install dependencies: Make sure all prerequisites mentioned above are installed on your system.

  3. Build for your platform: You can build either in release (template_release, optimized) or debug (template_debug, with debug symbols) mode. These names match Godot's export template names and refer to the final project artifacts that Godot will load, not the editor build. By default, template_debug is used if not specified.

    Build Commands
    • Linux:
      • Debug:
        scons platform=linux target=template_debug
      • Release:
        scons platform=linux target=template_release
    • Windows:
      • Debug:
        scons platform=windows target=template_debug
      • Release:
        scons platform=windows target=template_release
    • MacOS (Intel):
      • Debug:
        scons platform=macos arch=x86_64 target=template_debug
      • Release:
        scons platform=macos arch=x86_64 target=template_release
    • MacOS (Apple Silicon):
      • Debug:
        scons platform=macos arch=arm64 target=template_debug
      • Release:
        scons platform=macos arch=arm64 target=template_release
    • WebAssembly: (EXPERIMENTAL - UNFINISHED)
      • Debug:
        scons platform=web target=template_debug
      • Release:
        scons platform=web target=template_release

    The compiled libraries will be output to the demo/addons/godot-dojo/ directory.


🚀 Running the Demo

  1. Export or build the addon/library using the steps above.
  2. Open the project in Godot:
    • Launch Godot Engine.
    • Open the demo folder as a project.
  3. Run the demo scene:
    • Open the Demo scene under the game folder.
    • Press the Play button.

You should see basic interaction with Dojo backends or a simulated demo, depending on your build and configuration.


❓ Troubleshooting

  • If you see errors about missing dependencies, ensure all prerequisites are correctly installed.
  • For Rust-related errors: Ensure your Rust toolchain is installed and up to date (rustup update).

📜 License

This project is licensed under the MIT License. See LICENSE for details.


🙏 Credits

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •