A desktop GUI application for procedurally generating tile-based maps with asset-based texturing. Paint terrain types onto a canvas and generate detailed maps with smooth transitions, height maps, and layered forest vegetation.
- Terrain Painting: Paint terrain types onto a canvas using a circular brush
- Layer System: Multiple painting layers with opacity control and border effect toggles
- Texture Support: Load custom texture sets with automatic tiling
- ID Maps: Element-aware boundary handling that keeps texture elements (stones, tiles) intact at borders
- Perlin Noise Edges: Natural, organic terrain boundaries using Perlin noise
- Border Transitions: Automatic placement of transition segments between terrain types
- Multiple View Modes: Switch between draw mode, generated preview, border nodes, and height map visualization
- Export: Save generated maps as PNG
python main.py- Select Terrain: Choose a terrain type from the dropdown (grass, water, dirt, etc.)
- Adjust Brush: Use the slider to set brush size
- Paint: Click and drag on the canvas to paint terrain
- Manage Layers: Add/remove layers, toggle visibility and border effects
- Preview: Click "Preview Generated Map" to see the composited result
- Export: Use File > Export to save your map as PNG
assets/
├── perlin.png # Perlin noise texture for border effects
├── textures/ # Terrain textures
│ └── {name}/
│ ├── {name}_texture.png # Base texture (required)
│ └── {name}_id.png # ID map for element-aware cutoff (optional)
├── {terrain1}_to_{terrain2}/ # Transition segments (10.png, 25.png, etc.)
├── grass_assets/ # Grass detail sprites
├── forest_floor/ # Floor vegetation layer
├── forest_brush/ # Bushes/shrubs layer
└── forest_trees/ # Tree sprites (top layer)
- Create a folder:
assets/textures/{name}/ - Add
{name}_texture.png- your texture image - Optionally add
{name}_id.png- an ID map where each unique color identifies a distinct element
The new terrain will automatically appear in the terrain dropdown when assets are loaded.
ID maps use unique colors to identify individual elements within a texture (e.g., individual stones in a cobblestone texture). At terrain boundaries, elements are included or excluded as whole units based on a >50% coverage threshold, preventing elements from being cut through.