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])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file terraforge_core-1.1.0.tar.gz.
File metadata
- Download URL: terraforge_core-1.1.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
046ad3605f24d22de213b43574d421d13d884c3b7f5269b0c794bbc34ec3883a
|
|
| MD5 |
e86607143128dd3ec99dfa56c6432ba4
|
|
| BLAKE2b-256 |
49d7b94a6ecb3e4a7e50331a119e33cb4b209a2f569889647659ec453b978032
|
File details
Details for the file terraforge_core-1.1.0-py3-none-any.whl.
File metadata
- Download URL: terraforge_core-1.1.0-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b8a07d22f4bd09f5910729022e80cb4080ca35e63f79b8465e0f039d649f520
|
|
| MD5 |
be258b5d6f793a558fbfd297fb57903b
|
|
| BLAKE2b-256 |
5c9d1ab63d31d49bf3c88bfda4de265e2c456bffe497dc415d7193ee206ee57e
|