AnotherCraft project procedural voxel world generation system. The system is completely standalone and can be used for world generation in any voxel-based game. This is not a hard coded one-trick pony earth-like gen, this is a framework that allows you to easily generate and tweak any voxel terrain you desire!
!! This repository is only for the worldgen system itself. World rendering/visualisation is up to you to implement.
stdin
and stdout
pipes (see the interface documentation).woglac/parser
are autogenerated by Antlr4 from grammar grammar/Woglac.g4
(you can use the grammar/gen_parser.sh
script).See the examples folder.
Float z = worldPos()::z();
Float terrainZ = 195;
// That #342 is a function-local seed.
// The seeds are entered manually like this so that even when moving the function around, it still produces the same results.
export Block resultBlock = z < terrainZ ? (rand2D(#342) < 0.5 ? block.core.dirt : block.core.grass) : block.air;
The build command might look something like this:
git clone --recurse-submodules https://github.com/AnotherCraft/ac-worldgen
cd ac-worldgen
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
cd ../../
AC Worldgen is licensed under LGPL, which means you can incorporate it even into your commercial voxel projects free-of-charge. The system runs as a standalone application, so your code can stay closed source. You however have to make available any changes you've done to the AC Worldgen system itself. It would also be very nice of you to mention us in your credits.