-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Voronoi-based map generation
M. O'Leary proposed an interesting take on generating fantasy maps. This approach is based on voronoi diagrams. (See his repo for more information).
The code in engine_generaton/terrain does the same as O'Leary’s approach, but then renders it into a raster that is used to query chunk height in the voxel model, in a streaming fashion. Tiles are computed progessively (see my other repo).
Enhance gerenation
-
Use the voronoi model to generate tiles and city walls in
engine_generaton/terrain/tile. It should be rendered to the surface buffer (not the height! height is used for chunk voxel heights). Work this out intile/biomesandtile/cities. -
Properly rasterize rivers
tile/pixel, (and compute river water levels in chunks, the part that translates the height and surface buffers into actual blocks is located inengine_consistency/generator/generator_fantasy). -
A tileable noise pass can be fine-tuned to add local, higher-frequency hills. See
tile/noise.
Proposal: generate villages / cities, biomes and forests!
Performance bottlenecks
The whole approach is not real-time so it was made progressive.
The voronoi generation is a bottleneck, but it can be generated just once, when the server starts (this is what is done).
The erosion pass is the other main bottleneck. It uses Planchon and Darboux’s algorithm for filling sinks, but could be made faster with one or two iterations of Tierny and Pascucci’s algorithm. This involves a BFS which is not real-time either, but could complete faster.
Proposal: make the topological pass in engine_generation/terrain/tile/erosion progressive and use it as a default approach.