2026-03-06 09:10:40 -06:00
|
|
|
# Desktop Dungeon Generator
|
2026-03-05 22:04:33 +01:00
|
|
|
|
2026-03-06 20:24:31 +01:00
|
|
|
**Pre-release Notice:** This program is incomplete and functionality is subject to change and it might break, you've been warned.
|
|
|
|
|
|
2026-03-06 09:40:22 -06:00
|
|
|
A Rust desktop app for generating simple tabletop dungeon layouts.
|
2026-03-06 09:10:40 -06:00
|
|
|
|
|
|
|
|
## Current Features
|
|
|
|
|
|
|
|
|
|
- Resizable split layout:
|
|
|
|
|
- Left panel: generation settings
|
|
|
|
|
- Right panel: vector-rendered grid + dungeon preview
|
|
|
|
|
- Grid controls:
|
|
|
|
|
- Columns
|
|
|
|
|
- Rows
|
|
|
|
|
- Room controls:
|
|
|
|
|
- Room count
|
|
|
|
|
- Minimum room size (in grid cells)
|
|
|
|
|
- Maximum room size (in grid cells)
|
|
|
|
|
- `Square Rooms Only` toggle
|
|
|
|
|
- Corridor controls:
|
|
|
|
|
- `Corridor Randomness (%)` from `0` to `100`
|
|
|
|
|
- `Dead-End Rooms (%)` from `0` to `50`
|
2026-03-06 10:53:46 -06:00
|
|
|
- Door controls:
|
|
|
|
|
- `Door Frequency (%)`
|
|
|
|
|
- `Room/Hallway Door Chance (%)`
|
|
|
|
|
- `Locked Door Chance (%)`
|
|
|
|
|
- `Allow Middle Corridor Doors` toggle
|
2026-03-06 11:16:17 -06:00
|
|
|
- Accessibility:
|
|
|
|
|
- `Colorblind Mode` toggle (right panel)
|
|
|
|
|
- Pattern/style encoding:
|
|
|
|
|
- Rooms: crosshatch
|
|
|
|
|
- Corridors: dotted fill
|
|
|
|
|
- Walls: solid lines
|
|
|
|
|
- Doors: long dashes
|
|
|
|
|
- Locked doors: short dashes
|
|
|
|
|
- Archways: dotted lines
|
2026-03-06 09:10:40 -06:00
|
|
|
- Generate control:
|
2026-03-06 09:40:22 -06:00
|
|
|
- Master seed input (`u64`)
|
|
|
|
|
- `Random` seed button
|
2026-03-06 11:42:20 -06:00
|
|
|
- `Reset` button
|
|
|
|
|
- `Export Image` button
|
|
|
|
|
- Export format selector: `.png`, `.jpeg`, `.webp`, `.svg`
|
|
|
|
|
- Export uses an OS folder picker to choose save location
|
2026-03-06 09:10:40 -06:00
|
|
|
|
|
|
|
|
## Generation Behavior
|
|
|
|
|
|
|
|
|
|
- Rooms are stored as rectangles (`x`, `y`, `width`, `height`) and placed without overlap.
|
|
|
|
|
- Corridors are stored separately as vector line segments between grid cells.
|
|
|
|
|
- Every generated room is connected into one navigable network when possible.
|
2026-03-06 09:40:22 -06:00
|
|
|
- A master seed drives deterministic generation, and internal subsystems derive their own sub-seeds from it.
|
2026-03-06 10:53:46 -06:00
|
|
|
- Doors are generated from corridor adjacency:
|
|
|
|
|
- Open doors are rendered in red
|
|
|
|
|
- Locked doors are rendered in green
|
|
|
|
|
- Doors are rendered as line segments on grid boundaries
|
2026-03-06 09:10:40 -06:00
|
|
|
|
|
|
|
|
### Corridor Randomness
|
|
|
|
|
|
|
|
|
|
- `0%` randomness:
|
|
|
|
|
- Uses shortest-path routing for room-to-room corridor paths.
|
|
|
|
|
- Produces cleaner, direct corridor routes.
|
|
|
|
|
- `100%` randomness:
|
|
|
|
|
- Uses noisy/randomized routing while still ensuring room connectivity.
|
|
|
|
|
- Produces more wandering, less direct routes.
|
|
|
|
|
- Intermediate values blend between the two behaviors.
|
|
|
|
|
|
|
|
|
|
### Dead-End Rooms
|
|
|
|
|
|
|
|
|
|
- Controls how many rooms should end up as dead ends (rooms with only one room-to-room connection).
|
|
|
|
|
- `0%` targets no dead-end rooms (except tiny edge cases where topology makes this impossible, such as only 2 rooms).
|
|
|
|
|
- `50%` is the upper cap to avoid over-constraining connectivity.
|
|
|
|
|
|
|
|
|
|
## Run
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
cargo run
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Notes
|
|
|
|
|
|
|
|
|
|
- Rendering is vector-based in-app (`egui` painter), so zooming/scaling the preview remains crisp.
|
|
|
|
|
- Room and corridor vectors are stored separately to support future export workflows (for example, SVG export).
|
2026-03-06 09:42:57 -06:00
|
|
|
- Settings are persisted on exit and restored on startup from:
|
|
|
|
|
- Windows: `%LOCALAPPDATA%/desktop_dungeon_generator/settings.json`
|
|
|
|
|
- Linux: `~/.local/share/desktop_dungeon_generator/settings.json` (or distro-equivalent local data dir)
|