Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Generate random terrain using cellular automata.

Project description


Generate random terrain using cellular automata.


  • Python 3.x
  • Any Operating System


automatagen is published on PyPi, so you only need to run the following command:

$ pip install automatagen


Note: TerrainGenerator.generate(width, height) returns a 2d array of boolean values. All visualisations are made using numpy and matplotlib.

Instantiating a new TerrainGenerator:

from automatagen import TerrainGenerator

terrgen = TerrainGenerator()

Generating a random 196x64 size map:

map = terrgen.generate(196, 64)

196x64 default settings

Instantiating a TerrainGenerator with different options:

terrgen = TerrainGenerator(initial_density = 0.25, steps = 10, loneliness_limit = 5)

Generating a random 196x64 map with the new options:

map = terrgen.generate(196, 64)

196x64 different options

Generating a 196x64 map with a specific seed:

map = terrgen.generate(seed = 9001)

196x64 seeded map

And generating another one with the same seed:

map = terrgen.generate(seed = 9001)

196x64 seeded map

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for automatagen, version 0.2.post4
Filename, size File type Python version Upload date Hashes
Filename, size automatagen-0.2.post4-py3-none-any.whl (3.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size automatagen-0.2.post4.tar.gz (2.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page