Skip to main content

A customizable Python tool for generating maps for games and simulations.

Project description

TerraForge 🗺️

Procedural Biome/Island & Dungeon Map Generator using Simplex Noise

TerraForge is a versatile Python toolset for procedural map generation.

It includes tools for creating noise-based biome maps and multi-level dungeon layouts with fine-grained control over terrain shaping, biome placement, and dungeon structure.


🚀 Features

🌍 Biome Generator (TerraForge)

  • Elevation, Moisture, and Temperature map generation
  • Supports single and clustered multi-island generation
  • Falloff support: Radial, Edge, or None
  • Parameters for island spread, spacing, scale, and strength
  • Basic biome color mapping based on environmental conditions
  • Outputs high-resolution PNG images

🏰 Dungeon Generator (DungeonForge)

  • Multi-level dungeon generation (3D stack of floors)
  • Procedural room placement and corridor carving
  • Up/down stairs for vertical navigation
  • Console-based movement demo included
  • Optional PNG export per dungeon level
  • Tile color customization for export

📦 Requirements


📦 Installation

You can install TerraForge using pip.

pip install terraforge-core

🧪 Demos

Biome Map Generator

Run the included demo script:

python demo.py

The generated maps will be saved as biome_map, elevation_map, moisture_map, temperature_map, (noise_type)_map.

Dungeon Map Generator

Run either the included dungeon_demo script or dungeon_demo1 script.

python dungeon_demo.py

Console based demo with movement.

python dungeon_demo1.py

Generates .pngs for each dungeon level.


🚀 Usage - TerraForge (Biome Maps)

from terraforge import TerraForge

generator = TerraForge(map_size=300, image_size=(600, 600))

generator.generate(output_dir="maps")


🚀 Usage - DungeonForge (Dungeons)

from dungeonforge import DungeonForge

generator = DungeonForge()

dungeon_map = generator.generate()


⚙️ Customization Options

Biome Generator

Edit the values in terraforgepro.py or the demo to control:

  • map_size and image_size

  • falloff type: "radial", "edge", or None

  • num_islands, island_spread, min_island_spacing

  • noise types (elevation, moisture, temperature)

  • biome_thresholds for noise types (elevation, moisture, and temperature)

Dungeon Generator

  • Map size (width, height)
  • Number of levels (z_levels)
  • Maximum rooms and room size constraints
  • Tile symbols and export colors
  • Specify which levels to export (levels=[0, 2])

Related Libraries

  • CQCalendar: A lightweight, tick-based time/calendar/lunar cycle system for Python games and simulations.

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

terraforge_core-1.1.1.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

terraforge_core-1.1.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file terraforge_core-1.1.1.tar.gz.

File metadata

  • Download URL: terraforge_core-1.1.1.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for terraforge_core-1.1.1.tar.gz
Algorithm Hash digest
SHA256 7ccec86e836634d7379f7a5dcbb88a70d18afec4265cc49598eacc73bfada4b2
MD5 555edaefd7b77904f047cd131bbd2d2e
BLAKE2b-256 f3428c17faf89a3df961d350d68bc108d2298a696656a74179211f3257acb870

See more details on using hashes here.

File details

Details for the file terraforge_core-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for terraforge_core-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c22028647d7ae932dc3200d0d0e982edc197a2af6c9957c7caf7b75a1571a50d
MD5 376a1b02769879da20cf84bd92816fbe
BLAKE2b-256 c1b7ad08d9894d9e8ca6d395682635a653bb5eced5c7e79cff5b8031ed50b5f5

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