DoomGen
DoomGen is a Python library for procedural Doom map generation. It builds complete, playable WAD files from a seed and a small layout description, with control over geometry, floor heights, textures, things, and map scripts.
A dandelion: a central puff with a golden core, thin filament corridors, and seed tufts. Cells are colored by area. Generated by examples/dandelion.py.
How it works
DoomGen constructs maps starting from a relaxed Voronoi tessellation. It groups irregular cells into semantically defined areas, such as spawn rooms, arenas, and corridors, before translating the resulting graph into valid Doom geometry. This geometric irregularity makes spatial memorization harder for learning agents. Layouts are fully deterministic given an integer seed.
Because DoomGen separates the rules of a task from its geometry, the same scenario can be instantiated across many layouts without changing its objective. You can generate a single scenario or batches of scenarios.
Install
pip install doomgen
Requires Python 3.11 or 3.12. Wheels bundle ZDBSP for supported platforms. ACC is downloaded on demand for ACS compilation:
python -m doomgen.tools install acc
Optional visualization helpers:
pip install "doomgen[viz]"
From source:
git clone https://github.com/mitkozh/DoomGen.git
cd DoomGen
pip install -e ".[dev]"
Quick start
from doomgen import ConnectionType, ProceduralMapBuilder
builder = ProceduralMapBuilder(
bounds=(-1200, -1200, 1200, 1200), num_seeds=600, seed=7
)
builder.add_area("Hall", (-350, 0, 900, 900), floor_texture="FLOOR4_8")
builder.add_area("Depot", (500, 0, 800, 700), floor_texture="CEIL5_1")
builder.add_area("Vault", (0, 850, 500, 350), floor_texture="FLAT22")
builder.add_boundary("Hall", "Depot", name="Door", connection_type=ConnectionType.DOOR)
builder.add_corridor("Hall", "Vault", width=2)
builder.add_thing("PLAYER1_START", -350, 0, angle=0)
builder.add_thing("SHOTGUN", 500, 0)
builder.build("output/map.wad")
shape is (center_x, center_y, width, height). Use add_boundary for areas that share an edge, and add_corridor or add_stairs for areas separated by void. connect_adjacent creates an open join without a separate boundary area.
build() writes the WAD and runs the bundled ZDBSP.
Seeds and batches
Every call is deterministic. The same code and seed reproduce the same map; changing the seed keeps the areas in place while walls, sightlines, and corridor routing shift.
The same dandelion at seeds 7, 8, and 9. The seed decides how many tufts exist, where they sit, which sit high, and what spawns in each. Generated by examples/dandelion.py.
num_seeds sets the cell resolution. Coarse meshes build faster and suit large open spaces; finer meshes resolve narrow doors and small rooms. If an area claims no cells, raise num_seeds or enlarge its shape.
Generate a fixed batch over a parameter grid:
from doomgen import ProceduralMapBuilder
from doomgen.batch import BatchGenerator, Scenario
class Arena(Scenario):
def get_default_config(self):
return {"seed": 1}
def generate(self, output_path):
builder = ProceduralMapBuilder(num_seeds=600, seed=self.config["seed"])
builder.add_area("Arena", (0, 0, 1500, 1500))
builder.add_thing("PLAYER1_START", 0, 0)
builder.build(output_path)
batch = BatchGenerator(Arena, {"seed": [1, 2, 3]})
for scenario in batch.generate_scenarios("arena"):
scenario.generate(f"output/{scenario.name}.wad")
API
| Import | Contents |
|---|---|
doomgen |
ProceduralMapBuilder, ConnectionType, ThingType, DoomMapData, WADWriter, MapTranslator, VoronoiMesh |
doomgen.abstraction.layout |
LayoutGraph, Area, AreaConfig, Transform |
doomgen.geometry |
VoronoiMesh, generate_relaxed_seeds |
doomgen.logic.acs_builder |
ACSBuilder, ScriptType for ACS map scripts |
doomgen.batch |
Scenario, BatchGenerator for parameter-grid WAD batches |
doomgen.doom |
WADWriter, MapTranslator, ThingType, run_zdbsp |
doomgen.utils.paths |
get_bundled_compiler("zdbsp"), resolve_compiler |
doomgen.utils.visualization |
visualize_mesh (requires doomgen[viz]) |
Projects using DoomGen
- COMRAD - cooperative multi-agent reinforcement learning benchmark in ViZDoom. DoomGen was originally built for its procedural map pools.
- Add your project with a pull request.
Examples
examples/dandelion.py- the dandelion layout above (--render), and the three-seed comparison (--strip, requiresdoomgen[viz]).examples/also contains smaller demos for Voronoi meshing, corridors, stairs, and organic routing.
Development
git clone https://github.com/mitkozh/DoomGen.git
cd DoomGen
pip install -e ".[dev]"
pytest tests -v
ruff check src tests scripts setup.py
ruff format --check src tests scripts setup.py
mypy src/doomgen
License
MIT. See LICENSE.
Metadata
Release files for doomgen 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| doomgen-0.1.0.tar.gz | 1.2 MB | With provenance | Details for doomgen-0.1.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| doomgen-0.1.0-py3-none-win_arm64.whl | Python 3 | none | Windows ARM64 | Details for doomgen-0.1.0-py3-none-win_arm64.whl |
| doomgen-0.1.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for doomgen-0.1.0-py3-none-win_amd64.whl |
| doomgen-0.1.0-py3-none-win32.whl | Python 3 | none | Windows x86-32 | Details for doomgen-0.1.0-py3-none-win32.whl |
| doomgen-0.1.0-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details for doomgen-0.1.0-py3-none-manylinux_2_28_x86_64.whl |
| doomgen-0.1.0-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details for doomgen-0.1.0-py3-none-manylinux_2_28_aarch64.whl |
| doomgen-0.1.0-py3-none-macosx_11_0_universal2.whl | Python 3 | none | macOS 11.0+ universal2 (ARM64, x86-64) | Details for doomgen-0.1.0-py3-none-macosx_11_0_universal2.whl |
Total release size: 4.2 MB
Release files / doomgen-0.1.0.tar.gz
| Download URL | doomgen-0.1.0.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f4b4c0a47a1c5a5e8af0bd02e5a6c49a10f9de84b446737843cd8b2d54e871b
|
|
BLAKE2b-256 checksum How to use checksums |
455e2bc3b2fef1a3a24b15281fc3313a47792e6f280d7338528b9a12efcf883e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / doomgen-0.1.0-py3-none-win_arm64.whl
| Download URL | doomgen-0.1.0-py3-none-win_arm64.whl |
|---|---|
| Size | 417.5 kB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
4545569d6f07f1f040ed75984100467a802057b4a20d344fc8e0dc0ec1eb1a33
|
|
BLAKE2b-256 checksum How to use checksums |
9d381b82d188e0f1ad4944f9b15c6fb90c64a19bbd096bfd8f4c5491190ab7ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / doomgen-0.1.0-py3-none-win_amd64.whl
| Download URL | doomgen-0.1.0-py3-none-win_amd64.whl |
|---|---|
| Size | 417.5 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8355bd3356202220332e2c0dfe1382c52a3fe276c4541f49b259a0e3ee98f29a
|
|
BLAKE2b-256 checksum How to use checksums |
b067961dd963adb6248af643206b5ca79e0b3497ad6e82a8be061213cfe91388
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / doomgen-0.1.0-py3-none-win32.whl
| Download URL | doomgen-0.1.0-py3-none-win32.whl |
|---|---|
| Size | 417.5 kB |
| Tags | Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
2ec1375e09b6d2747ed5e3e4f9d0ca3f3721a77390897d022770fa1d5dee61ed
|
|
BLAKE2b-256 checksum How to use checksums |
3ba5162cc4aa964d509a5b5ab4e98574d201d1ad382a5acb54586a2d90828919
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / doomgen-0.1.0-py3-none-manylinux_2_28_x86_64.whl
| Download URL | doomgen-0.1.0-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 798.9 kB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
21e5b680b5ba966687b302e32b98144b81113100401d377cfe022d171fe5653d
|
|
BLAKE2b-256 checksum How to use checksums |
227f62e0eacbd15f6f2ef1f1d2ad256e59f5a9f2902fe59531ab314cbe5a91c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / doomgen-0.1.0-py3-none-manylinux_2_28_aarch64.whl
| Download URL | doomgen-0.1.0-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 474.1 kB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
cb5369b79a97f8bf964566834a3b22787b50212126ca0370d784b90042ed0ecc
|
|
BLAKE2b-256 checksum How to use checksums |
e257671903fa4f04526cb751f55b3ca6e3bd8b970fd4dfa6998df0fbf4fa7e30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / doomgen-0.1.0-py3-none-macosx_11_0_universal2.whl
| Download URL | doomgen-0.1.0-py3-none-macosx_11_0_universal2.whl |
|---|---|
| Size | 403.5 kB |
| Tags | Python 3 macOS 11.0+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
0bf8db8bb56442e061d3e70e3b3e27240a7d70ce72dfc53a458bbb1f8e671413
|
|
BLAKE2b-256 checksum How to use checksums |
a4a0636cdd976069be1d60d3e4551db1f899945647206d42dd85248eb1cc8801
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logSecurity for doomgen 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 7 files in this release have been uploaded with provenance metadata.
Attestation for doomgen-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.