2D physics-based universe and spaceflight simulator.
Written in Python with pygame-ce.
Wiki
- Clone this repository:
git clone https://github.com/sparklost/VolatileSpace.git - Install uv
cd endcord- Setup virtual environment:
uv sync --all-groups - run build script:
uv run build.py
Linux build can be optimized for performance by compiling pygame locally with llvm instead of gcc.
After build step 4:
- Uninstall already present pygame:
uv pip uninstall pygame-ce - Change compiler to clang/llvm:
export CC=/usr/bin/clang - Tell pip to build pygame from source:
export PIP_NO_BINARY=pygame-ce - Install pygame:
uv add pygame-ce - Now run build script:
uv run build.py
- Install Python 3.12 or later
- Install uv
- Clone this repository, unzip it
- Open terminal, cd to unzipped folder
- Setup virtual environment:
uv sync --all-groups - Run build script:
uv run build.py
Note
If built executable does not launch, try building with UPX disabled, see UPX.
Numba will significantly optimize simulation physics and math.
It is recommended to run this simulator with numba.
Numa will add 30-60s to first launch, and 1-10s to every after (if numba is enabled in settings).
build.py script by default builds with numba, to build without numba add this flag when running build.py: --nonumba
Or just uninstall numba: uv pip uninstall numba
This also disables 'Numba' and 'FastMath' options in settings.
UPX is an executable file compressor. It significantly reduces the total size of built executable.
On Windows, UPX directory called "upx" should be placed inside project directory.
on Linux, PyInstaller (used to build binary package) does not support UPX.
If installeed, build.py script by default runs UPX. To build without UPX add this flag when running build.py: --noupx
Head to wiki.