Persistent randomized generation of the universe with extraterrestrial life.
Multiverse is a simple project that demonstrates the concept of persistent procedural generation with location-based random seeds. In this project, a 2D virtual galaxy is generated with celestial bodies, where properties of each are determined by a unique seed based on the location within the galaxy. User can navigate the galaxy to find planets with life, which are marked with a green ring around them.
The universe is generated procedurally, but the generation is persistent. This means that the same seed will always
generate the same universe. On a 64-bit system, the universe is enormously large, on the order of
Unfortunately, not all the bodies are independent, as the generation is based on the location of the body. This is
done by combining
seed = (x & 0xFFFFFFFF) << 32 | (y & 0xFFFFFFFF)
Due to bit-shift and bitwise-or operations, there are roughly
- clone the repository
git clone https://github.com/ahemmatifar/multiverse.git
- Change to project directory and install the project
cd multiverse make dev_install
- Run the project
make run
- Additionally, if interested to build from source, use
make build
This project is licensed under the MIT License. See the LICENSE file for details.
- Inspired by procedural generation of the universe by javidx9.
- The Pygame community for providing a great library for game development in Python.