Torchlight Labyrinth - Escape the Dark
Your flame is the only thing between you and the dark.
A first-person dungeon crawler rendered in real-time raycasting, inspired by the brutal visibility rules of Escape the Dark. You are lost in a stone labyrinth with nothing but a guttering torch. The maze doesn't want you to find the way out, and the darkness doesn't want you to find anything at all.
---
About
Torchlight Labyrinth is a small, tense first-person maze crawler built entirely in Python. Every wall, every corridor, every dead end is raycast in real time — no engine, no assets, just math and a canvas.
The twist is the light. You don't get a bird's-eye view. You get a hard-edged circle of torchlight and nothing else. Everything beyond that circle is genuinely, completely black. Not dimmed, not fogged — black.
Your torch burns fuel. Fuel runs out. The maze doesn't care.
---
Features
- True raycast 3D — per-column wall casting with a hard light falloff, no pseudo-3D cheats
- Line-of-sight lighting — walls block light. Standing torches only illuminate what they can physically reach, so you can't cheese the map by peeking through stone
- A burning torch — fuel drains constantly. The flame flickers, sputters, and dims as it dies. At 0% the run is over
- Oil flasks — scattered through the maze. Each one buys you time. They respawn, but not quickly
- Fading memory map — press M to see what you've seen. Cells stay on your map for 5 seconds, then fade to black over the next 3. You have to keep looking to remember the way
- Procedurally generated maze — a new labyrinth every run, carved by depth-first search with extra loop openings so it never feels like a single solution
- The exit glows — if you can find it
---
Controls
| Key | Action |
|---|---|
| W A S D / Arrow keys | Move & turn |
| ← → | Rotate the camera |
| M | Toggle the minimap |
No mouse. No menus. Just you and the corridor.
---
Running the game
Requires Python 3 with Tkinter (bundled with most Python installs).
```
python torchlight_labyrinth.py
```
No dependencies, no install, no assets. One file. Runs on Windows, macOS, and Linux.
---
Difficulty
The game ships at Medium — roughly an 11-tile light radius. If you want to suffer properly, open the source and drop `self.player_light_radius` to `5.0`, or go full masochist at `2.5`.
| Preset | Radius |
|---|---|
| Very Easy | 20.0 |
| Easy | 15.0 |
| Medium | 10.0 |
| Hard | 5.0 |
| Very Hard | 2.5 |
You can also tune `memory_hold` and `memory_fade` to change how forgiving the map is.
---
Technical notes
Built with `tkinter.Canvas` and nothing else. Walls are cast with a DDA grid traversal; the floor and ceiling use a distance-banded gradient sampled across six horizontal column groups so lighting follows your actual field of view. Static torch light uses a cached line-of-sight ray-march so each torch is only tested once per cell.
The whole thing is under 800 lines and completely open for you to break, fork, and rebuild.
---
Credits
Design and code by the author. Inspired by Escape the Dark — go play it, it's better than this.
Font: Courier (system). Sound: none. Fear: included.
---
Made for people who like mazes, and for people who like being afraid of mazes.
---
Accessibility note: The game is intentionally very dark. Use an alternative brightness preset so change the brightness value.
Made by: Deepseek
Cover by: Stockcake
Download
Click download now to get access to the following files:
Development log
- Torchlight Labyrinth — Escape the Dark Just Released19 hours ago
