Skip to content

Procedurally generated 2D tile based overworlds using OpenSimplex in Python 3

Notifications You must be signed in to change notification settings

drippls/MapGeneration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

2D Map Generation

Overworld

Note

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 )

Example Islands

Usage

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

To-do List

Overworld

  • River Placement
  • Trees + Foliage
  • Houses
  • Ruins
  • Dungeon Entrances

About

Procedurally generated 2D tile based overworlds using OpenSimplex in Python 3

Topics

Resources

Stars

Watchers

Forks

Languages