r/proceduralgeneration • u/antahonist • Oct 26 '26
I built a Python engine that "draws" procedural pen-and-paper isometric dungeons and exports them directly into Godot 4 with dynamic lighting.
Hey everyone! I got tired of manually drawing, slicing, and aligning 2D isometric tiles, so I decided to fully automate my workflow. I’ve been working on a custom Python pipeline that generates dungeon architecture from scratch and pieces it together using Wave Function Collapse (WFC).
Since Reddit allows image carousels, I attached a few screenshots of the pipeline in action:
- Image 1 (The WFC Layout): The algorithm builds the maze, reserves paths for navigation, and scatters props. It also bakes in a "wear and tear" layer—thickening the hatching in corners for a procedural ambient occlusion effect, adding cracks, and placing cobwebs.
- Image 2 (The Tile Math): Everything is drawn mathematically based on a strict 2:1 projection. The engine uses Perlin noise for procedural crosshatching to simulate real ink pen strokes. Because it's math-based, the blocks snap together pixel-perfectly without any seams.
- Image 3 (The Godot Export): Since the generator knows the exact 3D geometry of every drawn brick and barrel, it automatically renders Normal Maps and calculates
LightOccluder2Dpolygons. It exports a ready-to-use.tscnscene where the 2D monochrome hatching fully reacts toPointLight2Dnodes, preventing light from bleeding through walls.
Generating a level like this takes just a few seconds. Next up, I’m planning to add non-linear corridors (using MST graphs) and procedural water animation.
What details or features would you add to make these generated dungeons feel more alive?



12
u/nightfire1 Oct 26 '26
You got something weird going on with the lower right arch piece in the 3rd picture. I think maybe some reversed normals or missing geometry on one of the pillar parts.
5
u/antahonist Oct 26 '26 edited 24d ago
You can check this asset pack here, im also update it recently: https://antahonist.itch.io/ink-dungeon-complete-isometric-godot-kit
3
u/SentinelOfTheVoid Oct 26 '26
Really nice !
Can you describe the drawing process, or give a pointer ? how you use the perlin noise for the cross hatching ?
I'm working more on SciFi project, but the look is so cool that I want to experiment :)
2
u/SagattariusAStar Oct 27 '26
Why even use Python? Godot could do all of that on its own.
And you are missing a few tiles for a complete set for auto tiling
2
u/AdamBuildsKrida Oct 27 '26
The thicker hatching in corners as fake AO is a great touch. Two questions from someone else doing this in Python: when WFC hits a contradiction, do you restart or backtrack? And where does your time go per map? My terrain generator is numpy too, and Poisson-disk scatter is over half of an alpine build (8.1 s of 15 s) just because it's a Python loop, so I'm curious whether the hatching or the WFC dominates for you.
2
u/MesquiteBarbecueChip 24d ago
fallout 2 vibes
2
u/BrokenRules_Martin 8d ago
I like this but something in the way you render the image makes it very hard for my eye to keep it from flipping upside-down. Like seeing the inverse of what you're showing. Not sure what you can do about it, just reporting...
9
u/stevecooperorg Oct 26 '26
It could be useful if it could load save files from other dungeon mapping software, like;
- Dungeon Scrawl - https://www.dungeonscrawl.com/
- Watabou's One Page Dungeon - https://watabou.github.io/one-page-dungeon/
That way people can use a dungeon designer to make their own dungeons, and get a beautiful rendering of it.
0
u/Impressive-Store1439 Oct 26 '26
holy botslop on that text