stelonix / height-map-generator

implementation of the diamond square algorithm to generate a height map and a biome map

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PythonHeightMap

implementation of the diamond square algorithm to generate a height map and a biome map

Viewer : Generate static chunks

python3 src/Viewer.py [depth] [coef]

  • 'depth' number of occurrences of the algorithm (starts to be very long from 8)
  • 'coef' maximum height difference between two blocks side by side

While the window is open you can use :

  • 'p' to smooth the chunk
  • 'u' enable/disable the coloration by height
  • 'i' enable/disable the coloration by biome

viewer sample

Discover : Generate a world

python3 src/Discover.py [depth] [coef]

  • 'depth' number of occurrences of the algorithm (starts to be very long from 8)
  • 'coef' maximum height difference between two blocks side by side

While the window is open you can use :

  • 'directional arrows' to move around the map and generate a new chunk
  • 'p' to smooth all the chunks
  • 'm' to regenerate the current chunk
  • 'u' enable/disable the coloration by height
  • 'i' enable/disable the coloration by biome

discover sample

TODO

  • rework the display system
  • reword code to upgrade general performances
  • add a seeding system
  • save the current window to an image

About

implementation of the diamond square algorithm to generate a height map and a biome map


Languages

Language:Python 100.0%