{"id":20292399,"url":"https://github.com/ladroid/goku","last_synced_at":"2025-04-11T11:22:41.259Z","repository":{"id":191689248,"uuid":"684628009","full_name":"ladroid/goku","owner":"ladroid","description":"Goku Game Engine - simple, easy to use GUI based game engine","archived":false,"fork":false,"pushed_at":"2024-08-23T18:43:09.000Z","size":40652,"stargazers_count":32,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-23T20:29:00.412Z","etag":null,"topics":["2d","2d-game","2d-game-engine","deep-learning","deeplearning","game","game-development","game-engine","gamedev","gameengine","gameengine2d","gpu","gui","multiplatform","open-source","opengl","pytorch","rust","rust-lang","sdl2"],"latest_commit_sha":null,"homepage":"https://gokuengine.com/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ladroid.png","metadata":{"files":{"readme":"README.md","changelog":"changes.txt","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-29T14:25:34.000Z","updated_at":"2024-08-23T18:43:12.000Z","dependencies_parsed_at":"2023-08-31T06:38:41.206Z","dependency_job_id":"5fa69e15-5b79-4f5f-ace1-9e1416bce767","html_url":"https://github.com/ladroid/goku","commit_stats":null,"previous_names":["ladroid/goku"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladroid%2Fgoku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladroid%2Fgoku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladroid%2Fgoku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladroid%2Fgoku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ladroid","download_url":"https://codeload.github.com/ladroid/goku/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248382144,"owners_count":21094541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d","2d-game","2d-game-engine","deep-learning","deeplearning","game","game-development","game-engine","gamedev","gameengine","gameengine2d","gpu","gui","multiplatform","open-source","opengl","pytorch","rust","rust-lang","sdl2"],"created_at":"2024-11-14T15:17:06.601Z","updated_at":"2025-04-11T11:22:41.239Z","avatar_url":"https://github.com/ladroid.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Goku Engine\r\n\r\n\u003cp align=\"center\"\u003e\r\n    \u003cimg src=\"docs/image/Goku_logo.png\" width=\"400\" height=\"400\" /\u003e\r\n\u003c/p\u003e\r\n\r\n![GitHub Workflow Status](https://img.shields.io/github/commit-activity/t/ladroid/goku)\r\n[![GitHub Repo stars](https://img.shields.io/github/stars/ladroid/goku)](https://github.com/ladroid/goku)\r\n[![Documentation](https://docs.rs/imgui-wgpu/badge.svg)](https://lados-organization.gitbook.io/goku/)\r\n![Repo Size](https://img.shields.io/github/repo-size/ladroid/goku)\r\n![License](https://img.shields.io/github/license/ladroid/goku)\r\n\r\n[ [English](README.md) | [Deutsch](docs/README.de.md) | [Español](docs/README.es.md) | [Français](docs/README.fr.md) | [日本語](docs/README.ja.md) ]\r\n\r\n\r\nGoku is a 2D game development application for Rust (in the future integration with 3D games). Written purely in Rust. \r\n\r\nIt’s available for **macOS**, **Windows** and **Linux**.\r\n\r\nBased on SDL2 (currently).\r\n\r\nGoku is focused, lightweight and has few dependencies (mostly SDL2). It provides:\r\n\r\n* a window and a main loop\r\n\r\n* 2D graphics and text\r\n\r\n* sounds and music\r\n\r\n* keyboard, mouse, and gamepad input\r\n\r\n* GUI interface for development\r\n\r\n* Pixel character generator using AI\r\n\r\n\u003cins\u003ethird party libraries which used Goku currently:\u003c/ins\u003e\r\n\r\n* SDL2\r\n\r\n* nalgebra\r\n\r\n* imgui\r\n\r\n* serde\r\n\r\n* rfd\r\n\r\n* glow\r\n\r\n* webbrowser\r\n\r\n## How to use\r\n\r\n**IMPORTANT!!!**\r\n\r\n* A quick overview is located here -\u003e [Goku Engine](https://gokuengine.com/)\r\n* The documentation is located here -\u003e [Gitbook](https://lados-organization.gitbook.io/goku/)\r\n* A development blog that covers our progress, plans and shiny new features is located here -\u003e [News](https://gokuengine.com/news)\r\n* All examples are located here -\u003e [Official Examples](https://github.com/ladroid/goku/tree/main/examples)\r\n\r\n## Requirements\r\n### Linux\r\nInstall these through your favourite package management tool, or via\r\nhttp://www.libsdl.org/\r\n\r\n**Ubuntu example:**\r\n\u003e sudo apt-get install libsdl2-dev\r\n\r\n**Fedora example:**\r\n\u003e sudo dnf install SDL2-devel\r\n\r\n**Arch example:**\r\n(Arch doesn't have separate regular and development packages, everything goes together.)  \r\n\u003e sudo pacman -S sdl2\r\n\r\nYou might also need a C compiler (`gcc`).\r\n\r\n#### Static linking in Linux\r\n\r\nYou can choose to link SDL2 statically instead of dynamically with the `static-link` feature.\r\nOn Linux, you will need to additionally do one of the following:\r\n* use the `bundled` feature\r\n* use the feature `use-pkgconfig` so 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\r\n* 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]\r\n\r\n### macOS\r\n#### Homebrew\r\nOn macOS, it's a good idea to install these via\r\n[homebrew][homebrew].\r\n\r\n```\r\nbrew install sdl2\r\n```\r\n\r\nIn recent versions of Homebrew, the installed libraries are usually linked into `$(brew --prefix)/lib`.\r\nIf you are running an older version, the symlink for SDL might reside in `/usr/local/lib`.\r\n\r\nTo make linking libraries installed by Homebrew easier, do the following for your respective shell.\r\n\r\nAdd this line to your `~/.zshenv` or `~/.bash_profile` depending on whether you use ZSH or Bash.\r\n```\r\nexport LIBRARY_PATH=\"$LIBRARY_PATH:$(brew --prefix)/lib\"\r\n```\r\n\r\n### Windows (MSVC)\r\n\r\n1. Download MSVC development libraries from http://www.libsdl.org/ (SDL2-devel-2.0.x-VC.zip).\r\n2. Unpack SDL2-devel-2.0.x-VC.zip to a folder of your choosing (You can delete it afterwards).\r\n3. Copy all lib files from\r\n    \u003e SDL2-devel-2.0.x-VC\\SDL2-2.0.x\\lib\\x64\\\r\n\r\n    to (for Rust 1.6 and above)\r\n    \u003e C:\\Program Files\\Rust\\\\**lib**\\rustlib\\x86_64-pc-windows-msvc\\lib\r\n\r\n    or to (for Rust versions 1.5 and below)\r\n    \u003e C:\\Program Files\\Rust\\\\**bin**\\rustlib\\x86_64-pc-windows-msvc\\lib\r\n\r\n    or to your library folder of choice, and ensure you have a system environment variable of\r\n    \u003e LIB = C:\\your\\rust\\library\\folder\r\n\r\n    For Rustup users, this folder will be in\r\n    \u003e C:\\Users\\\\{Your Username}\\\\.rustup\\toolchains\\\\{current toolchain}\\lib\\rustlib\\\\{current toolchain}\\lib\r\n\r\n  Where current toolchain is likely `stable-x86_64-pc-windows-msvc`.\r\n\r\n4. Copy SDL2.dll from\r\n    \u003e SDL2-devel-2.0.x-VC\\SDL2-2.0.x\\lib\\x64\\\r\n\r\n    into your cargo project, right next to your Cargo.toml.\r\n\r\n 5. When you're shipping your game make sure to copy SDL2.dll to the same directory that your compiled exe is in, otherwise the game won't launch.\r\n\r\n#### Static linking with MSVC\r\n\r\nThe MSVC development libraries provided by http://libsdl.org/ don't include a static library. This means that if you want to use the `static-link` feature with the windows-msvc toolchain, you have to do one of\r\n\r\n- build an SDL2 static library yourself and copy it to your toolchain's `lib` directory; or\r\n- also enable the `bundled` feature, which will build a static library for you; or\r\n- use a static SDL2 library from vcpkg as described below.\r\n\r\n### Pixel Character Generator Setup\r\nFor 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](https://github.com/LaurentMazare/tch-rs).\r\n\r\n#### How to install PyTorch\r\n\u003e pip3 install torch torchvision torchaudio\r\n\r\nFor more information chack out [here](https://pytorch.org/get-started/locally/)\r\n\r\n#### How to set up PyO3\r\nPyO3 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:\r\n\r\n* Any active Python virtualenv.\r\n* The python executable (if it's a Python 3 interpreter).\r\n* The python3 executable.\r\n\r\nYou can override the Python interpreter by setting the `PYO3_PYTHON` environment variable, e.g. `PYO3_PYTHON=python3.6`, `PYO3_PYTHON=/usr/bin/python3.9`, or even a PyPy interpreter `PYO3_PYTHON=pypy3`.\r\n\r\nSometimes PyO3 can give an error with linking Python libs for this case environment variable can be used:\r\n\r\nFor Windows:\r\n\u003e $env:LIB += \";\u003clocation_of_python_lib\u003e\"\r\n\r\nFor UNIX:\r\n\u003e export LIB=$LIB:/location_of_python_lib\r\n\r\n## Features\r\n\r\n* Graphics:\r\n    * a window and a main loop\r\n\r\n    * 2D graphics and text \r\n        - Button \r\n        - Slider \r\n        - Checkbox\r\n        - TextBox\r\n        - Fonts (only ttf format)\r\n        - Particle system (sparks)\r\n        - Parallax background\r\n\r\n    * GUI interface for development\r\n        * built-in Text Editor\r\n        * Debug Console\r\n\r\n    * Multiple image file formats: JPG and PNG\r\n\r\n    * Lighting:\r\n        - Point Light\r\n        - Spot Light\r\n        - Ambient Light Filter\r\n\r\n* Audio\r\n    - Play\r\n    - Loop\r\n    - Pause\r\n    - Resume\r\n    - Multiple audio file formats: OGG, MP3, FLAC, MOD\r\n\r\n* Input handler:\r\n    * keyboard, mouse, and gamepad input\r\n\r\n* Math types:\r\n    * Vector2 Vector3, Vector4\r\n    * Matrix33, Matrix34, Matrix43, Matrix44\r\n\r\n* Physics:\r\n    * Collisions\r\n    * Rigid body (currently we don't have a Kinematic rigid body)\r\n\r\n* Scene:\r\n    * Flexible JSON file format: Could describe either a whole scene or individual meshes.\r\n\r\n* Animation\r\n\r\n* AI system:\r\n    * Behaviour Tree\r\n\r\n* Timer\r\n\r\n* Dialogue System\r\n\r\n* Profiler\r\n\r\n* Support VSCode\r\n\r\n* Supports several languages:\r\n    - German\r\n    - Spanish\r\n    - Japanese\r\n    - French\r\n\r\n* Support Platform:\r\n    - Windows / Mac / Linux\r\n    - Web (WASM not integrated fully) (addition references [Emscripte](https://puddleofcode.com/story/definitive-guide-to-rust-sdl2-and-emscriptem/) / [SDL-WASM](https://gitlab.com/ThibaultLemaire/rust-sdl-canvas-wasm) / [Web](https://github.com/koute/cargo-web) )\r\n    - Android in the future\r\n\r\n## How to run\r\n\r\n1. ```git clone https://github.com/ladroid/goku.git```\r\n2. extract everything\r\n3. command to run: `cargo run`\r\n\r\n\u003e **Important!!!**\r\n\u003e 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!\r\n\r\n## How to build for Web\r\n\r\n1. Press Tools\r\n2. Press Build and choose Web\r\n\r\n## How to enable Viewport\r\n\r\nTo enable Viewport go to Preferences -\u003e General -\u003e Enable canvas the same is with Grid View mode\r\n\r\n## TODO (is prioritised)\r\n\r\n* ~~make finally a separate .rs file instead of one big~~  \r\n\r\n* ~~make a viewport instead of current solution with canvas (probably need a separate window inside of app with combination of sdl2 and OpenGL)~~\r\n\r\n* combine with wgpu ([Example from sdl2 lib](https://github.com/Rust-SDL2/rust-sdl2/blob/master/examples/raw-window-handle-with-wgpu/main.rs) and [imgui renderer for wgpu-rs](https://github.com/Yatekii/imgui-wgpu-rs))\r\n\r\n* improve physics\r\n\r\n* add/improve UI system (make possible to add image for buttons)\r\n\r\n* ~~improve lights and shadows~~\r\n\r\n* draw simple shapes (cirlce, rectangle, triangle, etc.)\r\n\r\n* ~~tabs~~\r\n\r\n* ~~profiler improve~~\r\n\r\n* ~~add/improve particle system~~\r\n\r\n* ~~improve engine's GUI as well as text editor (probably instead of built-in text editor make an integration with VSCode or other ide)~~\r\n\r\n* add blueprints (probably imgui node graph https://github.com/benmkw/imnodes-rs)\r\n\r\n* building games for mobiles iOS, Android\r\n\r\n* building games for consoles (PS4-5), Xbox, Nintendo Switch\r\n\r\n* physics material\r\n\r\n* integration with C++ (probably something like a bindgen)\r\n\r\n## Examples\r\n\r\n### 1. Tetris\r\n\r\nExample of building tetris game can be found [here](examples/tetris_game_example.rs)\r\n\r\n### 2. Roguelike prototype (Prototype)\r\n\r\nExample of building roguelike prototype can be found [here](examples/roguelike/README_game.md)\r\n\r\n### 3. Visual effects\r\n\r\n1. Sparks -\u003e use a function `spawn_particles_sparks` [from here](src/two_d/particle_system.rs)\r\n2. Fire -\u003e use a function `spawn_particles_fires` [from here](src/two_d/particle_system.rs)\r\n3. Rain -\u003e use a function `spawn_particles_rain` [from here](src/two_d/particle_system.rs)\r\n\r\n### 4. Side scrolling game\r\n\r\nExample of building sie scrolling prototype can be found [here](examples/simple_parallax_example.rs)\r\n\r\n### 5. Platformer\r\n\r\nExample of building platformer prototype can be found [here](examples/simple_platformer.rs)\r\n\r\n### 6. Set simple states for enemy(chasing/following)\r\n\r\nExample of building platformer prototype can be found [here](examples/enemy_behaviour.rs)\r\n\r\n## Japanese ver.\r\n\r\nJapenese version can be found [here](https://lados-organization.gitbook.io/goku/v/goku-game-engine_jp/)\r\n\r\n## French ver.\r\n\r\nFrench version can be found [here](https://lados-organization.gitbook.io/goku/v/goku-game-engine_fr/)\r\n\r\n## German ver.\r\n\r\nGerman version can be found [here](https://lados-organization.gitbook.io/goku/v/goku-game-engine_de/)\r\n\r\n## Spanish ver.\r\n\r\nSpanish version can be found [here](https://lados-organization.gitbook.io/goku/v/goku-game-engine_es/)\r\n\r\n## How to Contribute\r\n\r\n### Submitting Issues\r\nUse the Issue Tracker to submit bug reports and feature/enhancement requests. Before submitting a new issue, ensure that there is no similar open issue.\r\n\r\n### Manual Testing\r\nAnyone manually testing the code and reporting bugs or suggestions for enhancements in the Issue Tracker are very welcome!\r\n\r\n### Submitting Pull Requests\r\nPatches/fixes are accepted in form of pull requests (PRs). Make sure the issue the pull request addresses is open in the Issue Tracker.\r\n\r\nSubmitted pull request is deemed to have agreed to publish under Apache 2.0 License.\r\n\r\n## Community\r\n\r\n[Discord](https://discord.gg/9TAMqdRyED)\r\n\r\n[GitHub Discussion](https://docs.github.com/en/discussions/quickstart)\r\n\r\n## License\r\nGoku is licensed under Apache license version 2.0. See [LICENSE](https://pages.github.com/) file.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fladroid%2Fgoku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fladroid%2Fgoku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fladroid%2Fgoku/lists"}