Skip to content

arocull/stag-toolkit

Repository files navigation

Stag Toolkit

Godot addon for real-time 3D games, art, and simulations. Rust library also available for non-Godot development.

Currently equipped for Godot 4.5+ on Windows and Linux (gdextension), or all platforms (without gdextension).

Warning

Areas of this addon are highly experimental and frequently subject to change based on personal needs. These changes will sometimes require usage to be updated accordingly. Use at your own risk! Check for @experimental in docs to help identify unstable features.

If this tool has helped you, feel free to send a Kofi my way, or to anyone listed in the credits!

Feature List

  • StagTest test framework for simulating gameplay and performing benchmarks
  • IslandBuilder* tool for instantly converting whiteboxes into game-ready terrain
  • SimulatedRope and SimulatedRopeBinding* nodes for performing and interacting with rope simulations
  • QueueFloat* class for handling and analyzing float buffers with minimal allocations
  • StagLogger (wraps Logger) for error catching and granular logs
  • Simple LOD importer for hands-free importing of scenes with custom LODs and collision siblings
  • Texture/Material importer for .ironpress material imports
  • Shader includes and debug shaders

* Requires the built-in gdextension.

Some features can be toggled on/off via the Project Settings under addons/stag_toolkit. May require an plugin reload or editor restart.

Projects

These projects use StagToolkit! Feel free to contribute your own.

  • Abyss, a tower-defense platformer ( itch.io )

Installation

The latest stable plugin versions are published in the releases tab. Download and extract the zip archive, and copy the addons/stag_toolkit directory into your project's addons directory.

As a Rust Library

The stag-toolkit crate can also be used as a library for your own Rust projects, with the option to disable Godot-related features. In your Cargo.toml, add:

[dependencies]
stag-toolkit = { version = "0.4.0", git = "https://github.com/arocull/stag-toolkit", default-features = false }

This crate is not officially published to crates.io yet, but may be in the future.

Documentation

For the most up-to-date API documentation, use Godot Editor's internal "Search Help" feature (hotkey F1) to see internal class documentation. The master branch API is also hosted on GitHub pages, although the GDExtension docs are not properly generated yet.

Guides are manually documenated in the docs folder.

Building Manually

  1. Ensure Godot (using version as specified above) and Rust (I use the stable version) are installed
  2. Clone this repository
  3. cd into this repository and run cargo fetch
  4. Run $ make if on Linux, or $ build.cmd if on Windows
  5. Open the addon project in Godot to verify that it works: cd godot/ && godot project.godot
  6. Copy the godot/addons/stag_toolkit/ directory into your project as addons/stag_toolkit/

If desired, you can run $ make derust on Linux to remove any Rust-dependent stuff from the addon.

Cross Compiling

Make use of Rust's target system!

  • Install for key x86_64 platforms: $ rustup target add x86_64-unknown-linux-gnu x86_64-pc-windows-gnu
  • Get a list of all platforms: $ rustup target list
  • Ensure you have the proper linker installed to make use of cargo

These platforms currently are not supported, but may be supported in the future, in order of priority:

  1. Web Export wasm32-unknown-emscripten with threads
  2. Web Export wasm32-unknown-emscripten without threads
  3. Linux 32-bit
  4. Windows 32-bit
  5. Mac x86_64-apple-darwin

On Linux

Install the proper linkers!

  • Ubuntu: $ sudo apt-get install mingw-w64
  • Fedora: $ sudo dnf install mingw64-gcc

Development

You may need to install additional toolchains for pre-commit hooks.

  • $ pip install pre-commit gdtoolkit - Installs pre-commit hooks and a linting/formatting toolchain for GDScript.
  • $ pre-commit install - Initialize pre-commit hooks.

Contribution

This repository is mirrored from a private git server, but if you're interested in contributing, let me know!

My roadmap is based on personal needs.

Bug Reports

Feel free to file an issue ticket on GitHub with your issue.

Credits

About

Godot addon for real-time 3D games, art, and simulations

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published