Generate random terrain using cellular automata.
Project description
automatagen
Generate random terrain using cellular automata.
Compatibilities
- Python 3.x
- Any Operating System
Installation
automatagen is published on PyPi, so you only need to run the following command:
$ pip install automatagen
Usage
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)
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)
Generating a 196x64 map with a specific seed:
map = terrgen.generate(seed = 9001)
And generating another one with the same seed:
map = terrgen.generate(seed = 9001)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
automatagen-0.2.post3.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for automatagen-0.2.post3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b137cd17991612fa3707698e485a7afa00cbe62cb129835ffac940576054a3a7 |
|
MD5 | 2f4b7ff873c67ed6bce27db6242a4cdf |
|
BLAKE2b-256 | b4af1d9cc93efe9389457c968b3118de65af4eafb04408b4d238ce41a02c4468 |