As a basis for learning about procedural generation for two dimensional maps, I decided to build one from scratch using Python, Pillow, and OpenSimplex. Each "tile" is represented by a single pixel allowing visualisations of these generated islands. Images work best at a lower resolution as Python struggles to build larger images at a reasonable speed. Depending on the power of your computer I would recommend adjusting the build iterations to not wait around forever. (3-5: Slower, 6-15: Faster, Beyond: Beefy )
island = IslandGen(width, height, seed_value, image_name)
Class Arg | Width & Height | Seed Value | Image Name |
Explanation | Dimensions of your image | Number used to initialize the noise generator | The file name returned by the software + ".png" |
island.generate(iterations, scale, persistence, seed_label)
Argument | Iterations | Scale | Persistence | Seed Label |
Explanation | The number of times the noise generated is smoothed out |
The "zoom" of the image (0.5 is a good starting place) |
Level of detail in the image | Boolean value. True: Adds label | False: Doesn't |
Overworld
- River Placement
- Trees + Foliage
- Houses
- Ruins
- Dungeon Entrances