|
| 1 | +# Turnt-o-Mapper |
| 2 | + |
| 3 | +> A procedural `.map` file generator and Diabotical importer for the game **Turnt**. |
| 4 | +
|
| 5 | +<!-- Insert hero screenshot here --> |
| 6 | + |
| 7 | +Turnt-o-Mapper generates ready-to-play for Turnt / ready-to-compile Quake 3 `.map` files. |
| 8 | +Design a full map layout in seconds: choose room count, dimensions, corridor width, texture sets, and let the generator handle the geometry. |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +## Features |
| 13 | + |
| 14 | +- **6 layout strategies** — Linear, Zigzag, Snake, Random, Spiral, Multilevel |
| 15 | +- **Interactive 2D preview** — scroll to zoom, drag to pan, double-click to fit |
| 16 | +- **Interactive 3D wireframe** — drag to rotate, WASD to pan, scroll to zoom, Iso/Top/Front/Side presets |
| 17 | +- **Physics model** — acceleration-based speed simulation per room segment |
| 18 | +- **Texture selector** — assign floor / wall / ceiling textures with live preview |
| 19 | +- **Diabotical `.rbe` importer** — import existing DBT maps with configurable XYZ scale |
| 20 | +- **Auto-update** — checks GitHub Releases on startup and downloads new versions automatically |
| 21 | + |
| 22 | +--- |
| 23 | + |
| 24 | +## Download |
| 25 | + |
| 26 | +Pre-built binaries are available on the [Releases](../../releases) page: |
| 27 | + |
| 28 | +| Platform | File | |
| 29 | +|---|---| |
| 30 | +| Windows | `turnt-o-mapper-windows.exe` | |
| 31 | +| macOS | `turnt-o-mapper-macos` | |
| 32 | +| Linux | `turnt-o-mapper-linux` | |
| 33 | + |
| 34 | +**Windows:** Double-click the `.exe` — no install needed. |
| 35 | + |
| 36 | +**macOS:** If you see a security warning, right-click → Open, or run: |
| 37 | +```bash |
| 38 | +xattr -cr turnt-o-mapper-macos && chmod +x turnt-o-mapper-macos && ./turnt-o-mapper-macos |
| 39 | +``` |
| 40 | + |
| 41 | +**Linux:** |
| 42 | +```bash |
| 43 | +chmod +x turnt-o-mapper-linux && ./turnt-o-mapper-linux |
| 44 | +``` |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +## Build from source |
| 49 | + |
| 50 | +**Requirements:** Python 3.10+ |
| 51 | + |
| 52 | +```bash |
| 53 | +git clone https://github.com/dhcold/Turnt-o-mapper.git |
| 54 | +cd Turnt-o-mapper |
| 55 | +pip install PyQt6 Pillow |
| 56 | +python main.py |
| 57 | +``` |
| 58 | + |
| 59 | +Optional — texture thumbnails require Pillow (already listed above). |
| 60 | + |
| 61 | +### Build a standalone binary yourself |
| 62 | + |
| 63 | +```bash |
| 64 | +pip install pyinstaller |
| 65 | +pyinstaller --onefile --windowed --name turnt-o-mapper main.py |
| 66 | +# Output: dist/turnt-o-mapper[.exe] |
| 67 | +``` |
| 68 | + |
| 69 | +--- |
| 70 | + |
| 71 | +## Usage |
| 72 | + |
| 73 | +### Generate tab |
| 74 | +1. Set **Number of rooms** (2–100) and choose a **Layout style** |
| 75 | +2. Adjust **Room size** (min/max width, depth, height) |
| 76 | +3. Set **Corridor width** (25–100%) |
| 77 | +4. Optionally enable **Physics model** for acceleration-based level design |
| 78 | +5. Click **⚡ Generate** — preview updates instantly |
| 79 | + |
| 80 | +### Textures tab |
| 81 | +- Assign textures to **Floor**, **Wall**, and **Ceiling** categories using the F/W/C checkboxes |
| 82 | +- Set the **Texture folder** path in Settings to see live thumbnails |
| 83 | +- The generator picks randomly from each category per room |
| 84 | + |
| 85 | +### Settings tab |
| 86 | +- **Output .map file** — where the generated file is saved |
| 87 | +- **Texture folder** — path to your Turnt texture assets (for preview only) |
| 88 | +- **Game executable** — path to Turnt binary for the Launch button |
| 89 | + |
| 90 | +### DBT Import tab |
| 91 | +- Select a Diabotical `.rbe` map file |
| 92 | +- Configure X/Y/Z scale (Quake units per DBT block) |
| 93 | +- Click **Import** to get a `.map` |
| 94 | +- **Save** map file |
| 95 | + |
| 96 | +### Save & launch |
| 97 | +- **Save .map** — writes the current map to the configured output path |
| 98 | +- **Open folder** — opens the output folder in your file manager |
| 99 | +- **Launch game** — runs Turnt with `--import=<path>` to preview in-engine |
| 100 | + |
| 101 | +--- |
| 102 | + |
| 103 | +## Map pipeline |
| 104 | + |
| 105 | +``` |
| 106 | +Turnt-o-Mapper → .map file → Turnt |
| 107 | +``` |
| 108 | + |
| 109 | +The generated `.map` uses standard Quake 3 brush format and is compatible |
| 110 | +with any Q3-based compiler (q3map2, DarkPlaces, etc.). |
| 111 | + |
| 112 | +--- |
| 113 | + |
| 114 | +## Project structure |
| 115 | + |
| 116 | +``` |
| 117 | +main.py Entry point (QApplication bootstrap) |
| 118 | +turnt_o_mapper/ |
| 119 | + app.py Main window (PyQt6 UI) |
| 120 | + preview2d.py 2D top-down preview widget |
| 121 | + viewer3d.py 3D wireframe preview widget |
| 122 | + generation.py Map generation orchestrator |
| 123 | + layout.py Room placement & corridor routing |
| 124 | + brushes.py Quake 3 brush/face geometry |
| 125 | + entities.py Spawn, trigger, checkpoint entities |
| 126 | + dbt_import.py Diabotical .rbe importer |
| 127 | + constants.py Texture registry, theme colours, geometry params |
| 128 | + models.py Room & Bridge dataclasses |
| 129 | + config.py JSON config persistence |
| 130 | + updater.py GitHub Releases auto-update |
| 131 | + __version__.py Version string |
| 132 | +``` |
| 133 | + |
| 134 | +--- |
| 135 | + |
| 136 | +## License |
| 137 | + |
| 138 | +MIT |
0 commit comments