Join Galaxy Engine's Discord community!
Check out the official Steam page!
Galaxy Engine is a free and open source project made for learning purposes by NarcisCalin. It is made with C++ and it is built on top of the Raylib library.
Galaxy Engine uses libraries from the FFmpeg project under the LGPLv2.1
The entire UI is made with the help of the Dear ImGui library.
If you are using Codex or another coding agent, start by reading AI_STATUS.md for current build commands and the web vs desktop UI split. AGENTS.md points agents at this file on session start.
Special thanks to Crisosphinx for helping me improve my code.
Special thanks to SergioCelso for making the learning process a little easier and also for helping me implement the initial version of the Barnes-Hut quadtree.
Special thanks to Emily for helping me on multiple occasions, including setting up the CMake configuration and assisting with various parts of the project.
Galaxy Engine was built with interactivity in mind
There are multiple parameters to allow you to achieve the look you want
Add more quality to the simulation easily by subdividing the particles
Galaxy Engine includes SPH fluid physics for planetary simulation
Thanks to the Barnes-Hut algorithm, Galaxy Engine can simulate tens or even hundreds of thousands of particles in real time
Engine Galaxy includes a recorder so you can compile videos showcasing millions of particles
Result:
- Download the latest release version from the releases tab and unzip the zip file.
- Run the executable file inside the folder.
- (Currently Galaxy Engine binaries are only available on Windows)
- Galaxy Engine releases might get flagged as a virus by your browser or by Windows Defender. This is normal. It happens mainly because the program is not signed by Microsoft (Which costs money). If you don't trust the binaries, you can always compile Galaxy Engine yourself
-
CMake: On Windows, you can install it from their website or the Chocolatey cmake package, and on Linux you can install the
cmakepackage with your package manager. -
A C++ compiler: Any compiler is probably gonna work, but Clang is recommended as it's known to produce a faster binary than GCC for this project.
- Clang: On Linux, you may install the
clangpackage from a package manager. On Windows, it can be installed from their website, the Chocolatey llvm package, or from the Visual Studio Installer:
- Clang: On Linux, you may install the
-
FFmpeg: Install via your package manager (
brew install ffmpegon macOS,apt install ffmpegon Debian/Ubuntu, etc.) so the build can use system headers and libraries; the CMake script will automatically detect the installation before attempting to download the bundled prebuilt.
These instructions assume you have already met the above requirements.
- Clone or download this repo
- Build the project with CMake
- After doing this you should have the executable file inside the build folder
- The last step is running the executable file from the same working directory as the "Textures" folder (otherwise the particles won't be visible). This applies to the "Shaders" and "fonts" folder as well
- (recommended): Use VS Code with Node.js + npm installed. The repo includes preconfigured npm scripts, which show up under the VS Code Explorer > NPM SCRIPTS panel.
- Examples:
npm run dev(build wasm-debug + serve),npm run release(build wasm-release + serve),npm run deploy.
- Examples:
- Install the emsdk toolchain, then run
source /path/to/emsdk_env.shsoemcmake/emmakeare on yourPATH. - Configure with
emcmake cmake --preset wasm-debug(orwasm-release) and thencmake --build --preset wasm-debugto generate the HTML/JS/WASM trio underbuild/wasm-debug. - The wasm build already skips the FFmpeg bundle and only uses Raylib, ImGui, GLM, etc., so you can serve the output with
emrun/python3 -m http.serveror plug it into a Next.js shell once the UI is ready.












