Goku Game Engine - simple, easy to use GUI based game engine
Last updated May 26, 2026
36
Stars
2
Forks
2
Issues
0
Stars/day
Attention Score
5
Topics
Language breakdown
Rust 95.1%
Python 4.9%
βΈ Files
click to expand
README
Goku Engine
- a window and a main loop
- 2D graphics and text
- sounds and music
- keyboard, mouse, and gamepad input
- GUI interface for development
- Pixel character generator using AI
- SDL2
- nalgebra
- imgui
- serde
- rfd
- glow
- webbrowser
How to use
IMPORTANT!!!- A quick overview is located here -> Goku Engine
- The documentation is located here -> Gitbook
- A development blog that covers our progress, plans and shiny new features is located here -> News
- All examples are located here -> Official Examples
Requirements
Linux
Install these through your favourite package management tool, or via http://www.libsdl.org/ Ubuntu example:sudo apt-get install libsdl2-devFedora example:
sudo dnf install SDL2-develArch example: (Arch doesn't have separate regular and development packages, everything goes together.)
sudo pacman -S sdl2You might also need a C compiler (
gcc).
Static linking in Linux
You can choose to link SDL2 statically instead of dynamically with thestatic-link feature.
On Linux, you will need to additionally do one of the following:
- use the
bundledfeature
- use the feature
use-pkgconfigso that rustc knows where to look for your SDL2 libraries and its dependencies for static linking. This is required because there is no built-in way to find the resources needed to link statically SDL2 from your system
- install development libraries with [vcpkg][vcpkg]. Instructions to generate a static binary on Linux and other operating systems using vcpkg are [here][cargo-vcpkg-usage]
macOS
Homebrew
On macOS, it's a good idea to install these via [homebrew][homebrew].brew install sdl2
In recent versions of Homebrew, the installed libraries are usually linked into $(brew --prefix)/lib.
If you are running an older version, the symlink for SDL might reside in /usr/local/lib.
To make linking libraries installed by Homebrew easier, do the following for your respective shell.
Add this line to your ~/.zshenv or ~/.bash_profile depending on whether you use ZSH or Bash.
export LIBRARYPATH="$LIBRARYPATH:$(brew --prefix)/lib"
Windows (MSVC)
- Download MSVC development libraries from http://www.libsdl.org/ (SDL2-devel-2.0.x-VC.zip).
- Unpack SDL2-devel-2.0.x-VC.zip to a folder of your choosing (You can delete it afterwards).
- Copy all lib files from
stable-x86_64-pc-windows-msvc.
- Copy SDL2.dll from
Static linking with MSVC
The MSVC development libraries provided by http://libsdl.org/ don't include a static library. This means that if you want to use thestatic-link feature with the windows-msvc toolchain, you have to do one of
- build an SDL2 static library yourself and copy it to your toolchain's
libdirectory; or
- also enable the
bundledfeature, which will build a static library for you; or
- use a static SDL2 library from vcpkg as described below.
Pixel Character Generator Setup
For the new feature pixel character generator make sure that Python 3 and PyTorch is installed. Currently the AI is written in Python however there is a plan to rewrite it in Rust by using tch-rs.How to install PyTorch
pip3 install torch torchvision torchaudioFor more information chack out here
How to set up PyO3
PyO3 uses a build script (backed by the pyo3-build-config crate) to determine the Python version and set the correct linker arguments. By default it will attempt to use the following in order:- Any active Python virtualenv.
- The python executable (if it's a Python 3 interpreter).
- The python3 executable.
PYO3PYTHON environment variable, e.g. PYO3PYTHON=python3.6, PYO3PYTHON=/usr/bin/python3.9, or even a PyPy interpreter PYO3PYTHON=pypy3.
Sometimes PyO3 can give an error with linking Python libs for this case environment variable can be used:
For Windows:
$env:LIB += ";For UNIX:ofpython_lib>"
export LIB=$LIB:/locationofpython_lib
Features
- Graphics:
- Audio
- Input handler:
- Math types:
- Physics:
- Scene:
- Animation
- AI system:
- Timer
- Dialogue System
- Profiler
- Support VSCode
- Supports several languages:
- Support Platform:
How to run
clone https://github.com/ladroid/goku.git
- extract everything
- command to run:
cargo run
Important!!!
Currently GUI is still under the development, I'm trying to combine imgui and sdl2 together but need sometime to make it full compatible. Thus, if someone wants to use it is possible to add component Scene and write there a script. If you know how to combine them will be really great!
How to build for Web
- Press Tools
- Press Build and choose Web
How to enable Viewport
To enable Viewport go to Preferences -> General -> Enable canvas the same is with Grid View modeTODO (is prioritised)
make finally a separate .rs file instead of one big
make a viewport instead of current solution with canvas (probably need a separate window inside of app with combination of sdl2 and OpenGL)
- combine with wgpu (Example from sdl2 lib and imgui renderer for wgpu-rs)
- improve physics
- add/improve UI system (make possible to add image for buttons)
improve lights and shadows
- draw simple shapes (cirlce, rectangle, triangle, etc.)
tabs
profiler improve
add/improve particle system
improve engine's GUI as well as text editor (probably instead of built-in text editor make an integration with VSCode or other ide)
- add blueprints (probably imgui node graph https://github.com/benmkw/imnodes-rs)
- building games for mobiles iOS, Android
- building games for consoles (PS4-5), Xbox, Nintendo Switch
- physics material
- integration with C++ (probably something like a bindgen)
Examples
1. Tetris
Example of building tetris game can be found here2. Roguelike prototype (Prototype)
Example of building roguelike prototype can be found here3. Visual effects
- Sparks -> use a function
spawnparticlessparksfrom here
- Fire -> use a function
spawnparticlesfiresfrom here
- Rain -> use a function
spawnparticlesrainfrom here
4. Side scrolling game
Example of building sie scrolling prototype can be found here5. Platformer
Example of building platformer prototype can be found here6. Set simple states for enemy(chasing/following)
Example of building platformer prototype can be found hereJapanese ver.
Japenese version can be found hereFrench ver.
French version can be found hereGerman ver.
German version can be found hereSpanish ver.
Spanish version can be found hereHow to Contribute
Submitting Issues
Use the Issue Tracker to submit bug reports and feature/enhancement requests. Before submitting a new issue, ensure that there is no similar open issue.Manual Testing
Anyone manually testing the code and reporting bugs or suggestions for enhancements in the Issue Tracker are very welcome!Submitting Pull Requests
Patches/fixes are accepted in form of pull requests (PRs). Make sure the issue the pull request addresses is open in the Issue Tracker. Submitted pull request is deemed to have agreed to publish under Apache 2.0 License.Community
Discord GitHub DiscussionLicense
Goku is licensed under Apache license version 2.0. See LICENSE file.π More in this category