Keys and Torches builds dungeons from a seed and checks each one before you see it. Every plan is proven solvable: in the shipped property test, 10000 seeds per preset (Small, Medium, Large) gave 0 unsolvable dungeons and 0 keys behind their own locks. In the editor, the Check 1,000 seeds button reads "0 unsolvable, median 23 ms, worst 62 ms".
Show full description...
Want to see the stone, the flame and the torch light in your project first? Try the free sample: Keys and Torches Lite.
Generating 40 rooms takes a median of 32.1 ms (p99 52.5 ms, worst 107.1 ms) and building them into the scene takes 271 ms, measured in the editor on an Apple M1 Pro.
The generator
- A seed is a short share code. The same seed gives the same plan in the editor and in a player.
- A plan saves as JSON, and a saved plan rebuilds without running the generator.
- Four sigil keys and one great key, levers wired to gates, barred doors that open from the bar side, secret walls, and traps that hurt but never block the way.
- Floors stack up to three and join by stairs.
- Fog of war and a top-down cutaway: wall pieces, torches and wall props go together, so nothing floats where a wall was cut.
- Your own rooms: bake a room in the editor, validate it, add it to a TemplateSet. A PlanPass hook runs inside the generator for your game rules; the README shows one in 20 lines.
The kit
- 155 models: 67 modular pieces, 32 working props, 56 decor props, plus 30 room templates.
- Torch-only lighting: a light budget gives 64 torches a real light at a time, nearest and in view first.
- Two demos, top-down and first person, with an autoplayer that finishes every seed (20 of 20 passed per preset in both cameras).
- First person, High tier, Large bench seed: 285.0 fps average, 129.0 fps 1% low. Top-down: 378.9 fps average, 219.3 fps 1% low. Desktop build on an Apple M1 Pro at 1920 x 1080, median of three runs.
Try it in the browser
The browser demo opens on the generator screen: pick a size, press Generate, watch the reveal, then Play or Autoplay. The seed field takes a share code.
What you get
- Unity package for URP (Unity 6000.6 or newer, URP 17.6 or newer), with the generator, both demos and the documentation.
- The models as FBX and GLB for other engines.
- A free Lite package with 15 stone models, the shaders and one torch, on its own page: Keys and Torches Lite.
Models and textures are procedural, built by scripts. Rendered and tested on Metal (macOS); please test on your target platform. Support: cholak.apps@gmail.com
The FBX and GLB files also import into Blender, Godot, Unreal and Roblox Studio. Roblox Studio brings them in as meshes, and the textures are assigned by hand there.
Questions or problems? Write in the comments: every comment gets an answer, and bugs get fixed.