The code works both on Linux and Windows. For Linux the script setup_vulkan_deps.sh
should do most of the Vulkan setup required as long as your graphics driver is installed.
On Windows additional setup for Vulkan is not necessary.
The recommended way to setup Rust is with rustup.sh
Install the stable track of Rust
rustup install stable
You will also need to install Python
, CMake
, and ninja-build
to compile the shaders. Install those via your preferred method for your platform.
Change into the procgen-terrain
directory.
You can build the app using
cargo build --release
The application will be found in target/release/procgen-terrain
You can just run the application to use the default settings. However it can take a number of command line arguments to control the generation process.
procgen-terrain 0.1.0
USAGE:
procgen-terrain.exe [OPTIONS]
FLAGS:
--help Prints help information
-V, --version Prints version information
OPTIONS:
-b, --bounds <bounds> [default: 30]
-g, --gridsize <gridsize> [default: 256]
-h, --houses <houses> [default: 10]
-m, --map <map> [default: 128.0]
-n, --noise <noise> [default: 512]
-s, --seed <seed> [default: 100]
-t, --trees <trees> [default: 200]
noise
: Control the size of the noise map (NxN) that is generated. This allows you to control the resolution of the noisemap
: Size (MxM) of the terrain mesh generated in world coordinatesgridsize
: The resolution (GxG) of the terrain mesh. Higher numbers mean more vertices in the meshseed
: The seed for the noise generator. Giving the same seed generates the same noise mapbounds
: The distances from the center that modeled geometry can spawn. Prevents unnecessary rendering for models that can't be seentrees
: Number of trees to spawn. Trees are spawned in random positions on the terrain within the boundshouses
: Number of houses to spawn. Like trees houses are spawned in random positions within the bounds
200120
42
100
1337
238121