Go to file
Nail Khanipov 52dbef90b7
fix(ecs-gestalt): Migrate Components to gestalt's Components. (#42)
Ref: MovingBlocks/Terasology#4753

Co-authored-by: Michael Pollind <mpollind@gmail.com>
Co-authored-by: Tobias Nett <skaldarnar@googlemail.com>
2021-08-25 17:55:51 +02:00
images Add island construction step images 2015-07-24 21:18:03 +02:00
overrides/engine/textures Update loading image name for engine PR #1632 2015-03-12 18:10:41 +01:00
src fix(ecs-gestalt): Migrate Components to gestalt's Components. (#42) 2021-08-25 17:55:51 +02:00
.gitattributes chore: update core (spring cleanup) (#21) 2020-05-18 22:33:44 +02:00
.gitignore Initial commit 2014-05-06 18:13:45 +02:00
README.md Update README - Add island generation steps 2015-07-24 21:34:09 +02:00
module.txt chore: prepare snapshot builds for 1.1.0-SNAPSHOT 2021-05-01 23:56:25 +02:00

README.md

PolyWorld

This is a polygon-based world generating module. It is based on the map generating algorithm by Amit Patel of Red Blob Games.

image1

The basic idea is to tesselate the terrain (using Fortune's algorithm) into a set of polygons. Currently, only island worlds are supported. An island world is created as follows:

Step 1: Since the terrain is infinite, it needs to be partitioned into finite areas first:

step1

Step 2: The area is tesselated into polygons. The algorithms behind this are approximate Poisson disc sampling to generate a well-behaved set of sampling points, Fortune's algorithm to compute the initial Voronoi diagram and Lloyd's relaxation to regularize the polygon shapes.

step2

Step 3: Based on a random noise function such as Perlin noise, water and land vertices are defined. Starting at the border of the rectangle, the height of the island increases towards the center. Lake areas are flattened afterwards.

step3

Step 4: Since the elevation gradient is monotonously increasing, rivers can start at any corner of the map, flow downhill and always reach either a lake or the ocean.

step4

Step 5: Based on height and the distance to rivers, a map of moisture is generated.

step5

Step 6: Each of the regions is assigned to exactly one biome as defined by Whittaker.

step6

Step 7: Each of the biomes has its unique distribution of flowers, mushrooms and other small plants.

step6

Step 8: Same goes for different tree types.

step8

Acknowledgements

This module is loosely based on the Java implementation by Connor Clark.

License

This module is licensed under the Apache 2.0 License.