A curated list of free add-ons and scripts for Godot, but specifically for hyperoptimized computation and scientific methodology.
You can find a general list for free Godot stuff in Godot's own Awesome Godot.
If you find this interesting, you may want to join our Godot Scientific Discord: https://discord.gg/mwS2sW6V5M.
For the sake of this repository, scientific software is software that is commonly used by scientists to achieve their goals. You may have heard of software such as NumPy, tensorflow and MatLab. These are the kinds of things we are talking about.
General-purpose programming is very useful. But when you have large amounts of data, your program can start to slow down a lot. This is because general purpose programming can waste a lot of CPU cycles for duplicated or unnecessary logic.
To solve this issue, many smart people have optimized common operations, such as addition, matrix multiplications, or even convolutions. This comes in many forms, but often involves hyperoptimized CPU or GPU instructions such as SIMD or CUDA. If you want your code to be fast, you can use these implementations to speed it up.
If you have a computation task, and you aren't sure where to start with optimization, this flowchart may help you decide on a particular strategy to use. The flowchart will suggest you the option that involves the least amount of effort, depending on your use-case. Keep in mind it makes a recommendation, and should not be regarded an authority as to which library actually fits your use-case best.
---
title: Which approach should I take for a computational problem in Godot?
---
flowchart TD
Start[Is plain GDScript / C# sufficient?] -->|No| ExistingLibrary(Does any existing library offer algorithms that can solve your probem?)
Start -->|Yes| GDScript(Use GDScript / C#.)
ExistingLibrary -->|Yes| UseExistingLibrary(Use a library that covers your problem.)
ExistingLibrary -->|No| Export(Do you need to export your project for others to use?)
Export -->|Yes| Vectorizable(Is your problem parallelizable / vectorizable?)
Export -->|No| Python(Use the Python GDExtension, and a fitting Python library.)
Vectorizable -->|No| GDExtension(Write a custom GDExtension.)
Vectorizable -->|Yes| Convenient(Do you just want the most convenient option?)
Convenient -->|No| Static(Is your problem representable by a compute graph?)
Convenient -->|Yes| NumDot(Use NumDot.)
Static -->|"Yes, and I don't mind using Python (or something else) to build it."| IREE(Use IREE.gd.)
Static -->|No| GPU("Can your algorithm be run on the GPU?")
GPU -->|Yes, and I don't mind putting in extra effort for extra speed.| ComputeShader(Use compute shaders.)
GPU -->|No| NumDot(Use NumDot.)
- GDBlas: Real and Complex matrix algebra for Godot, wrapping around Eigen, Boost and ODEInt.
- GDMP: Running machine learning learning models in Godot, with MediaPipe.
- IREE.gd: Running machine learning models in Godot, with IREE.
- NumDot: NumPy-like tensor math and scientific computation for Godot, using xtensor.
- OpenCV for Godot: Bringing computer vision to Godot, with OpenCV.
- Python Extension: Write your Godot scripts and classes in Python.
- Py4Godot: Write your Godot scripts and classes in Python.
- EasyCharts: Godot-native charts and plots.
- GDMatPlot: Extensive plots and charts library, with GNUPlot.
- GodPlot: Godot4 native graphing plugin. Works as
@tool
in the editor.
None yet.
- NumDot Tutorials are available as part of its documentation.
- Optimizing image processing w/ GDBlas.
- Ongoing community poll: Godot Science and Computation Survey / 2024