Spelunky is © 2008, 2009 Derek Yu and Mossmouth, LLC, and is used under the [Spelunky User License v1.1b](https://spelunky.ai/LICENSE.txt). spelunky.ai is an unofficial fan project, not affiliated with or endorsed by Mossmouth. The game and its assets may not be sold.

Music by George Buzinkai and Jonathan Perry; sound effects made in SFXR. From Spelunky Classic 1.1, © 2008, 2009 Derek Yu and Mossmouth, LLC.

# Dark level

From the spelunky.ai wiki: <https://spelunky.ai/wiki/dark-level>. Verified against the spelunky.ai port [v0.1.10](https://github.com/851-labs/spelunky/releases/tag/v0.1.10) on 28 October 2026.

A dark level is a special level of Spelunky Classic, lit only around the player and a few lights: 1 in 12, at most once an area, and never in the Ice Caves.

![A small lamp, glowing](https://spelunky.ai/wiki/media/aa0fe627885261d5/sprites/sLamp/anim%404x.png)

| Dark level |                                                                                                                                                       |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Levels     | 2–8, 13–15[^1]                                                                                                                                        |
| Chance     | 1 in 12, at most once an area[^2]                                                                                                                     |
| Part of    | [The Mines](https://spelunky.ai/wiki/mines)[^1], [The Jungle](https://spelunky.ai/wiki/jungle)[^1], [The Temple](https://spelunky.ai/wiki/temple)[^1] |

A dark level is an ordinary level of its area, built as usual, but drawn in the dark: the screen is black
except for the circles that lights cut out of it. The player has a dim light of his own, and a crate of
flares waits by the entrance. Generation adds lamps or tiki torches, makes the traps lit kinds that glow,
and hangs [Scarabs](https://spelunky.ai/wiki/scarab), which live only here.

## Generation

### The roll

Each level makes the roll, 1 in 12, after its rooms are built. A level can't be dark if it's level 1,
[Olmec's Lair](https://spelunky.ai/wiki/olmecs-lair) (level 16) or in [the Ice Caves](https://spelunky.ai/wiki/ice-caves), if its area has had a dark level
already, or if the level before it was finished too fast[^2][^3]. The area's dark level is forgotten on its first level (1, 5,
9 and 13), so each of the three areas that can be dark has one at most[^4].

"Too fast" is the screen between levels' doing: it reads the finished level's time and turns dark levels
off for the next one if the seconds past the whole minute are 20 or fewer, the code's comment calling it a
speed run[^5]. So a level that took 1:05 rules out a dark
level as one that took 0:05 does, and one that took 0:21 doesn't. A new game starts with dark levels off,
so the first level after the title screen is never dark, the [shortcuts](https://spelunky.ai/wiki/tunnel-man-shortcuts)' levels 5, 9 and 13 included[^6][^7].

The [Black Market](https://spelunky.ai/wiki/black-market) is never dark: it's lit again after the roll. But a roll that comes up there
still counts as the Jungle's dark level, so no later Jungle level is dark[^8][^7][^9]. Any other special level
can be dark too: a [snake pit](https://spelunky.ai/wiki/snake-pit), a [flooded level](https://spelunky.ai/wiki/flooded-level), a
[graveyard level](https://spelunky.ai/wiki/restless-dead), the [City of Gold](https://spelunky.ai/wiki/city-of-gold).

A dark level opens with "I CAN'T SEE A THING!" and "I'D BETTER USE THESE FLARES!", or, if the player wears
the [Hedjet](https://spelunky.ai/wiki/hedjet), "THE HEDJET SHINES BRIGHTLY."[^10]. A
special level's own message comes after it[^11]. In the clip,
level 2 of the Mines loads dark: the crate of flares glows beside the entrance, and the player climbs down
through the dark by his own small light[^12].

**Clip: A dark level.** Level 2 of the Mines loads dark, with the message "I CAN'T SEE A THING! I'D BETTER USE THESE FLARES!" A crate of flares glows by the entrance, and the player climbs down through the dark by the small light around him. ([video](https://spelunky.ai/wiki/media/aa0fe627885261d5/clips/dark-level/arrival/clip.mp4))

### The darkness

Each step, the screen is filled with black and then lit in circles[^13]:

| Light                                                                                                              | Radius                                                                       |            |
| ------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------- | ---------- |
| The player                                                                                                         | 96 pixels less 64 times the darkness (below): about 38 pixels at the darkest | [^14]      |
| A flare, the crate of flares, a lamp (hanging or carried), an explosion                                            | 96 pixels                                                                    | [^15][^16] |
| The [Ghost](https://spelunky.ai/wiki/ghost)                                                                        | 64 pixels                                                                    | [^17]      |
| A lit trap, a tiki torch, a [Fire Frog](https://spelunky.ai/wiki/fire-frog), [Lava](https://spelunky.ai/wiki/lava) | 32 pixels                                                                    | [^18][^19] |
| A [Scarab](https://spelunky.ai/wiki/scarab)                                                                        | 16 pixels                                                                    | [^20]      |

The darkness is the distance from the player to the nearest light (a flare, or within 200 pixels a lamp,
the crate, lava or an explosion, a lit trap or a tiki torch counting as 48 pixels farther than it is),
divided by 160, and 0.9 at most. So the player's own light grows as he nears a light, and is at its widest, 96 pixels, beside one[^21][^22]. With the
Hedjet the darkness is 0, and his light is always 96 pixels ([Hedjet](https://spelunky.ai/wiki/hedjet#dark-levels)).

### Made dark later

Defiling one of [Kali's altars](https://spelunky.ai/wiki/kalis-altar) a third time, and every time after, makes the level dark, with a
[Ghost](https://spelunky.ai/wiki/ghost) if there's none yet; if it's dark already and has a Ghost, [Kali](https://spelunky.ai/wiki/kali) punishes the player
another way[^23]. That can darken any level with an altar,
the Ice Caves' too, but it comes after generation, so such a level has none of the lights, lit traps or
Scarabs below.

## Inhabitants

The dark level's own monster is the [Scarab](https://spelunky.ai/wiki/scarab), made only on a dark level, in the spots where
monsters hang under a block (two open tiles below)[^24][^25][^26]:

| Monster                                   | Area                                          | Chance                                                                                                                                              |       |
| ----------------------------------------- | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| [Scarab](https://spelunky.ai/wiki/scarab) | [The Mines](https://spelunky.ai/wiki/mines)   | 1 in 40, once the [Giant Spider](https://spelunky.ai/wiki/giant-spider)'s and a lamp's 1 in 60 fail, before a [Bat](https://spelunky.ai/wiki/bat)'s | [^27] |
| [Scarab](https://spelunky.ai/wiki/scarab) | [The Jungle](https://spelunky.ai/wiki/jungle) | 1 in 40, before a Bat's                                                                                                                             | [^28] |
| [Scarab](https://spelunky.ai/wiki/scarab) | [The Temple](https://spelunky.ai/wiki/temple) | 1 in 40                                                                                                                                             | [^29] |

The rest are the area's usual monsters. A Scarab is treasure that flits about, and glows; in the clip, on a
dark Temple level, the player drops onto one and collects it[^30].

**Clip: Scarab.** On a dark Temple level, the player drops down onto a glowing scarab and collects it: his money starts counting up by $12,000. ([video](https://spelunky.ai/wiki/media/aa0fe627885261d5/clips/scarab/collect/clip.mp4))

## Hazards

The traps are the area's, but made as lit kinds that glow[^31][^32][^33][^34][^35]:

- **Lit [Arrow Traps](https://spelunky.ai/wiki/arrow-trap)** in the Mines and the Temple, which fire as the plain ones do. In the
  clip, one fires into the player as he drops down a ladder through its line, and a bomb destroys it[^36].

  **Clip: Lit arrow trap.** On a dark level, a lit arrow trap fires as the player drops down a ladder through its line; the arrow takes two hearts. He walks back, lays a bomb beside the trap and climbs away, and the blast destroys it. ([video](https://spelunky.ai/wiki/media/aa0fe627885261d5/clips/arrow-trap/dark/clip.mp4))
- **Lit [Spear Traps](https://spelunky.ai/wiki/spear-trap)** in the Jungle and the Temple.
- **Lit [Smash Traps](https://spelunky.ai/wiki/smash-trap)** in the Temple. The lit kind isn't a smash trap to the player's code: its
  touch takes no hearts and throws him nowhere, and it kills only by sliding on into him until he's crushed[^7][^37].

## Items and shops

- **A crate of flares** by the entrance, on its left if there's room, else on its right, else on it[^38]. It's carried like a heavy item, and opened by pressing
  up and the attack key over it, which throws out three flares[^39][^40]. Flares and the crate go out in water[^41][^42].
- **Lamps**, in the Mines, hanging under a block, 1 in 60 where a monster could hang[^43]. When the block above it is destroyed, a lamp falls as one the
  player can carry[^44].
- **Tiki torches**, in the Jungle, on 1 in 20 of the ground's spots for a [Spear Trap](https://spelunky.ai/wiki/spear-trap), before
  the trap's roll[^45].

Shops and treasure are the area's. Every shop has a lamp, which lights it on a dark level[^46][^47][^48].

## Trivia

- Messages stay on screen twice as long on a dark level: the screen's drawing counts their time down each
  step, and the level's own drawing, which shows them only when the level is lit, counts it down again, so
  a message lasts 200 steps in the dark and 100 in the light[^49][^50][^7][^51].
  So a special level's second message, 209 steps after the first, follows it 9 steps after it's gone in
  the dark, where in the light the screen is clear for 109[^10][^52][^53].
- The light around the player is tinted blue the darker it is: its colour is full blue, with red and green
  falling as the darkness grows[^54].
- The level's own drawing code once darkened the screen with a rectangle, and is commented out[^55].
- Two commented-out lines sit in the roll: an older version of it with a chance of 1 in 1, and one that
  would have put a flare at the player's feet on every dark level[^56].
- [Level generation](https://spelunky.ai/wiki/level-generation) draws the lamp's and the Scarab's rolls from the random numbers on lit levels too, as
  GameMaker 8 evaluates both sides of an `and`[^57][^7].

## FAQ

### How do you get a dark level in Spelunky Classic?

By chance: each level of [the Mines](https://spelunky.ai/wiki/mines), [the Jungle](https://spelunky.ai/wiki/jungle) and [the Temple](https://spelunky.ai/wiki/temple) after the first has a 1 in 12 chance, once in an area at most. The roll only counts if the level before it took more than 20 seconds past a whole minute on its clock, so a fast level is never followed by a dark one.

### How do you see on a dark level in Spelunky Classic?

By light: the player carries a small light of his own, and a crate of three flares waits by the entrance. Lamps, glowing traps, tiki torches, lava, explosions and [Scarabs](https://spelunky.ai/wiki/scarab) light the cave around them, and wearing the [Hedjet](https://spelunky.ai/wiki/hedjet) widens the player's light to a flare's.

### Are there dark levels in the Ice Caves in Spelunky Classic?

No. Level generation never makes an Ice Caves level dark, nor level 1, Olmec's Lair or the [Black Market](https://spelunky.ai/wiki/black-market). Defiling one of Kali's altars too often can darken any level, after it's made.

### What is special about a dark level in Spelunky Classic?

Only dark levels have [Scarabs](https://spelunky.ai/wiki/scarab), glowing beetles worth money, and their traps are lit kinds that glow. The level opens with "I CAN'T SEE A THING! I'D BETTER USE THESE FLARES!".

## Gallery

**Clip: Lit smash trap.** On a dark Temple level, the player jumps into the line of a lit smash trap, which slides at him and crushes him. ([video](https://spelunky.ai/wiki/media/aa0fe627885261d5/clips/smash-trap/lit/clip.mp4))

## See also

- **Related:** [Scarab](https://spelunky.ai/wiki/scarab), [Hedjet](https://spelunky.ai/wiki/hedjet), [Ghost](https://spelunky.ai/wiki/ghost), [Level generation](https://spelunky.ai/wiki/level-generation), [Speedrunning basics](https://spelunky.ai/wiki/speedrunning-basics)
- **Found here:** [Arrow Trap](https://spelunky.ai/wiki/arrow-trap), [Scarab](https://spelunky.ai/wiki/scarab), [Smash Trap](https://spelunky.ai/wiki/smash-trap), [Spear Trap](https://spelunky.ai/wiki/spear-trap)

## References

[^1]: [`scripts/scrInitLevel.gml:169`](https://spelunky.ai/wiki/source/scripts/scrInitLevel#L169)

[^2]: [`scripts/scrInitLevel.gml:167-174`](https://spelunky.ai/wiki/source/scripts/scrInitLevel#L167-L174)

[^3]: [`scripts/scrClearGlobals.gml:54`](https://spelunky.ai/wiki/source/scripts/scrClearGlobals#L54)

[^4]: [`scripts/scrInitLevel.gml:31-37`](https://spelunky.ai/wiki/source/scripts/scrInitLevel#L31-L37)

[^5]: [`objects/oTransition/draw.gml:89-102`](https://spelunky.ai/wiki/source/objects/oTransition/draw#L89-L102)

[^6]: [`scripts/scrClearGlobals.gml:51`](https://spelunky.ai/wiki/source/scripts/scrClearGlobals#L51)

[^7]: Quirk 1 (docs/quirks.md)

[^8]: [`scripts/scrInitLevel.gml:176`](https://spelunky.ai/wiki/source/scripts/scrInitLevel#L176)

[^9]: Replay `fidelity/replays/jungle-seed-9-market-dark-roll.txt`

[^10]: [`objects/oPlayer1/alarm_0.gml:5-13`](https://spelunky.ai/wiki/source/objects/oPlayer1/alarm_0#L5-L13)

[^11]: [`objects/oPlayer1/alarm_1.gml:1-48`](https://spelunky.ai/wiki/source/objects/oPlayer1/alarm_1#L1-L48)

[^12]: Clip dark-level/arrival

[^13]: [`objects/oScreen/step_begin.gml:148-240`](https://spelunky.ai/wiki/source/objects/oScreen/step_begin#L148-L240)

[^14]: [`objects/oScreen/step_begin.gml:178`](https://spelunky.ai/wiki/source/objects/oScreen/step_begin#L178)

[^15]: [`objects/oScreen/step_begin.gml:179-194`](https://spelunky.ai/wiki/source/objects/oScreen/step_begin#L179-L194)

[^16]: [`objects/oScreen/step_begin.gml:219-222`](https://spelunky.ai/wiki/source/objects/oScreen/step_begin#L219-L222)

[^17]: [`objects/oScreen/step_begin.gml:231-234`](https://spelunky.ai/wiki/source/objects/oScreen/step_begin#L231-L234)

[^18]: [`objects/oScreen/step_begin.gml:195-218`](https://spelunky.ai/wiki/source/objects/oScreen/step_begin#L195-L218)

[^19]: [`objects/oScreen/step_begin.gml:223-226`](https://spelunky.ai/wiki/source/objects/oScreen/step_begin#L223-L226)

[^20]: [`objects/oScreen/step_begin.gml:227-230`](https://spelunky.ai/wiki/source/objects/oScreen/step_begin#L227-L230)

[^21]: [`objects/oLevel/step.gml:110-137`](https://spelunky.ai/wiki/source/objects/oLevel/step#L110-L137)

[^22]: [`objects/oPlayer1/step.gml:73-136`](https://spelunky.ai/wiki/source/objects/oPlayer1/step#L73-L136)

[^23]: [`objects/oSacAltarLeft/destroy.gml:39-58`](https://spelunky.ai/wiki/source/objects/oSacAltarLeft/destroy#L39-L58)

[^24]: [`scripts/scrEntityGen.gml:47-62`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L47-L62)

[^25]: [`scripts/scrEntityGen.gml:264-271`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L264-L271)

[^26]: [`scripts/scrEntityGen.gml:445-450`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L445-L450)

[^27]: [`scripts/scrEntityGen.gml:52-63`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L52-L63)

[^28]: [`scripts/scrEntityGen.gml:271-272`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L271-L272)

[^29]: [`scripts/scrEntityGen.gml:449`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L449)

[^30]: Clip scarab/collect

[^31]: [`scripts/scrEntityGen.gml:155-168`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L155-L168)

[^32]: [`scripts/scrEntityGen.gml:247-249`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L247-L249)

[^33]: [`scripts/scrEntityGen.gml:436-437`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L436-L437)

[^34]: [`scripts/scrEntityGen.gml:467-471`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L467-L471)

[^35]: [`scripts/scrEntityGen.gml:508-521`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L508-L521)

[^36]: Clip arrow-trap/dark

[^37]: Clip smash-trap/lit

[^38]: [`scripts/scrEntityGen.gml:527-545`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L527-L545)

[^39]: [`objects/oFlareCrate/create.gml:1-12`](https://spelunky.ai/wiki/source/objects/oFlareCrate/create#L1-L12)

[^40]: [`objects/oPlayer1/step.gml:649-669`](https://spelunky.ai/wiki/source/objects/oPlayer1/step#L649-L669)

[^41]: [`objects/oFlare/step.gml:4-17`](https://spelunky.ai/wiki/source/objects/oFlare/step#L4-L17)

[^42]: [`objects/oFlareCrate/step.gml:3-18`](https://spelunky.ai/wiki/source/objects/oFlareCrate/step#L3-L18)

[^43]: [`scripts/scrEntityGen.gml:61`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L61)

[^44]: [`objects/oSolid/destroy.gml:29-33`](https://spelunky.ai/wiki/source/objects/oSolid/destroy#L29-L33)

[^45]: [`scripts/scrEntityGen.gml:235-238`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L235-L238)

[^46]: [`scripts/scrRoomGen.gml:173-204`](https://spelunky.ai/wiki/source/scripts/scrRoomGen#L173-L204)

[^47]: [`scripts/scrRoomGen.gml:427-431`](https://spelunky.ai/wiki/source/scripts/scrRoomGen#L427-L431)

[^48]: [`objects/oScreen/step_begin.gml:187-190`](https://spelunky.ai/wiki/source/objects/oScreen/step_begin#L187-L190)

[^49]: [`objects/oScreen/step_begin.gml:243-259`](https://spelunky.ai/wiki/source/objects/oScreen/step_begin#L243-L259)

[^50]: [`objects/oLevel/draw.gml:11-27`](https://spelunky.ai/wiki/source/objects/oLevel/draw#L11-L27)

[^51]: Replay `fidelity/replays/mines-seed-2.txt`

[^52]: Replay `fidelity/replays/jungle-seed-10-dark-graveyard-lake.txt`

[^53]: Replay `fidelity/replays/city-of-gold-seed-9-sacrifice-pit.txt`

[^54]: [`objects/oScreen/step_begin.gml:155`](https://spelunky.ai/wiki/source/objects/oScreen/step_begin#L155)

[^55]: [`objects/oLevel/draw.gml:1-10`](https://spelunky.ai/wiki/source/objects/oLevel/draw#L1-L10)

[^56]: [`scripts/scrInitLevel.gml:168-173`](https://spelunky.ai/wiki/source/scripts/scrInitLevel#L168-L173)

[^57]: [`scripts/scrEntityGen.gml:61-62`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L61-L62)

### Source code

- [`scripts/scrInitLevel.gml`](https://spelunky.ai/wiki/source/scripts/scrInitLevel)
- [`scripts/scrEntityGen.gml`](https://spelunky.ai/wiki/source/scripts/scrEntityGen)
- [`scripts/scrClearGlobals.gml`](https://spelunky.ai/wiki/source/scripts/scrClearGlobals)
- [`objects/oTransition/draw.gml`](https://spelunky.ai/wiki/source/objects/oTransition/draw)
- [`objects/oLevel/step.gml`](https://spelunky.ai/wiki/source/objects/oLevel/step)
- [`objects/oScreen/step_begin.gml`](https://spelunky.ai/wiki/source/objects/oScreen/step_begin)
- [`objects/oPlayer1/alarm_0.gml`](https://spelunky.ai/wiki/source/objects/oPlayer1/alarm_0)
- [`objects/oPlayer1/alarm_1.gml`](https://spelunky.ai/wiki/source/objects/oPlayer1/alarm_1)
