Skip to main content

Advanced Procedural World Generator library for Python with JSON and PNG export

Project description

ProcWorld

Advanced Procedural World Generator library for Python. Generate maps with biomes, rivers, lakes, mountains, and elevation. Export maps to JSON or PNG for games, simulations, or visualizations.


Features

  • Procedural terrain generation with multiple biomes:

    • Forests, plains, mountains, deserts, water
  • Rivers and lakes placement

  • Elevation map generation

  • Terminal display with emojis

  • Export to JSON for programmatic use

  • Export to PNG for visual representation

  • Fully modular and library-ready

  • Seeded randomness for reproducible worlds


Installation

pip install procworld

Optional dependency for PNG export:

pip install Pillow

Usage

from procworld import WorldGenerator

# Create a world
world = WorldGenerator(width=40, height=20)
world.generate()

# Display in terminal
print(world.display())

# Export to JSON
world.export_json("example_world.json")

# Export to PNG
world.export_png("example_world.png")

# Access raw data
terrain_map = world.get_map()
elevation_map = world.get_elevation()
print(f"Seed used: {world.seed}")

Parameters

  • width (int): Width of the world map (default 50)
  • height (int): Height of the world map (default 20)
  • seed (int, optional): Seed for reproducible worlds. Random if None

Export Functions

  • export_json(filename="world.json"): Save map and elevation data as JSON
  • export_png(filename="world.png", cell_size=20): Save map as PNG image

Contributing

  • Fork the repository
  • Create a new branch for your feature
  • Submit a pull request with improvements or new biomes

License

MIT License © veliqq


Example Output (Terminal)

🌾🌾🌲🌲🌾🌾🌊🌾🌾🌲
🌲🌲🌾🌾🌾🌊🌊🌲🌾🌾
🌾🌾🌾🌲🌲🌲🌾🌾🌾🌲
⛰️⛰️🌾🌾🌾🌾🌾🌲🌲🌾
🌾🌾🌾🌾💧💧💧🌾🌲🌲

ProcWorld makes generating and visualizing procedural worlds simple, fast, and fun!

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

procworld-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

procworld-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file procworld-0.1.0.tar.gz.

File metadata

  • Download URL: procworld-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for procworld-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c0c5d13a824ff325a5ada27ca22d08304ee38e4de13eaac0f360a54b082e717e
MD5 883e0024bf29861ea62a3e59dcf5c55e
BLAKE2b-256 97531998c8f1c8b4b2fb75b3a179baf5ee612782fae8de18371feafb9caede1d

See more details on using hashes here.

File details

Details for the file procworld-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: procworld-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for procworld-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8953e469fa3af9285d5991e82ec418c51274b78d90322b57f924e36ab40ac666
MD5 04a0fcf62e7dc18fb9f7fb1470a17a8b
BLAKE2b-256 667b18b0c2643a124892154001a3cff68fbc6650d439f25afb3c39cbe5fd2e3a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page