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.

# Ceiling Trap

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

The Ceiling Trap is a trap in Spelunky Classic that seals the Temple's idol room when the Golden Idol is taken and lowers its spiked ceiling onto the player.

![A tan stone block whose underside opens into a row of spikes](https://spelunky.ai/wiki/media/e82af40b6e70bb75/sprites/sCeilingTrapS/anim%404x.png)

| Ceiling Trap |                                               |
| ------------ | --------------------------------------------- |
| Damage       | 10 hearts a step[^1]                          |
| Trigger      | Taking the Golden Idol in the Temple[^2]      |
| Objects      | `oCeilingTrap`, `oDoor`, `oTempleFake`        |
| Found in     | [The Temple](https://spelunky.ai/wiki/temple) |

The Ceiling Trap guards [the Temple](https://spelunky.ai/wiki/temple)'s [Golden Idol](https://spelunky.ai/wiki/golden-idol). The idol's room looks like any
other until the idol is picked up: then a stone door drops into each of the room's two openings, and the
room's ceiling, a row of blocks with spikes underneath, starts to come down. It moves slowly, but nothing
stops it short of the floor, and it takes 10 hearts a step from a player it reaches.

## How it works

**Clip: Ceiling trap.** In the Temple, the player walks into the idol room and picks up the Golden Idol: doors drop to seal the room's two openings, and the ceiling starts coming down. It reaches his head about eleven seconds later and crushes him, then settles on the floor. ([video](https://spelunky.ai/wiki/media/e82af40b6e70bb75/clips/ceiling-trap/crush/clip.mp4))

Picking up the idol on a Temple level shakes the screen, sets every Ceiling Trap block in the level dropping,
and sets falling the doors nearest to points up and to the left and right of the player[^2].

- **The doors** are two blocks tall, set into the room's side walls. Each falls, gaining speed up to 6 pixels
  a step, until it lands on the floor, filling the opening below it[^3].
  The wall where it stood was a stand-in that turns into an ordinary block once the door has left it, so the
  wall stays whole[^4].
- **The ceiling** comes down 1 pixel every 4 steps (7.5 pixels a second), showing its spikes, until it rests
  on what's below it[^5][^6].

In the clip, the player walks into the idol room and picks the idol up; both doors are down 7 steps later. The
ceiling reaches his head 320 steps (10.67 seconds) after the pickup and kills him, and settles on the floor 59
steps after that.

## Damage

A Ceiling Trap block that has started to drop takes 10 hearts on every step it touches the top of the
player's head[^1]. Nothing spaces out the hits, and each one he
takes alive is counted in the end-of-game statistics' ceiling trap row[^7]. One that keeps
coming down over him also crushes him[^8].

## Locations

Only in [the Temple](https://spelunky.ai/wiki/temple)'s idol room. Each side room off the path through a Temple level has a 3 in 4
chance of being one of the special side rooms; of those, the first roll is 1 in 12 for a Kali altar (once a
level), and then 1 in 12 for the idol room, once a level, never in the City of Gold[^9]. The room has six Ceiling Trap blocks across its ceiling, a door on
each side, and the idol on the floor[^10][^11].

## Avoiding

- **Leave the idol.** Nothing happens until it's picked up.
- **Break out.** The doors and the ceiling blocks aren't unbreakable: a [Bomb](https://spelunky.ai/wiki/bomb)'s blast destroys them as
  it does blocks, and so does the rock around the room.
- **Use the time.** The ceiling takes over 10 seconds to come down to a standing player's head.

## Interactions

- **Monsters** don't take the 10 hearts' worth of damage: that check is the player's alone.
- **The idol** only sets the trap off once[^12].

## Trivia

- Both objects have a state for going back up, `RETURN`, that nothing ever enters: the ceiling stays down[^13].
- If a Temple idol were picked up in a level without a Ceiling Trap, the player's code would destroy the
  [skull blocks](https://spelunky.ai/wiki/trap-block) within 90 pixels of him instead; the Temple's only idol room always has the trap[^14].

## FAQ

### How do you escape the ceiling trap in Spelunky Classic?

Break out before the ceiling comes down, about 10 seconds after the Golden Idol is picked up. Doors seal the room's openings at once, but the ceiling and the doors are ordinary blocks to a [Bomb](https://spelunky.ai/wiki/bomb), so a bomb opens a way out.

### How much damage does the ceiling trap do in Spelunky Classic?

10 hearts on every step the lowering ceiling touches the player's head, which kills him from any ordinary number of hearts.

### What triggers the ceiling trap in Spelunky Classic?

Picking up the [Golden Idol](https://spelunky.ai/wiki/golden-idol) in [the Temple](https://spelunky.ai/wiki/temple). The idol's room has the trap built into its ceiling and a door on each side.

## See also

- **Related:** [Golden Idol](https://spelunky.ai/wiki/golden-idol), [Boulder](https://spelunky.ai/wiki/boulder), [Smash Trap](https://spelunky.ai/wiki/smash-trap), [Trap Block](https://spelunky.ai/wiki/trap-block)

## References

[^1]: `objects/oPlayer1/step.gml:1670-1680`

[^2]: `objects/oPlayer1/step.gml:1250-1265`

[^3]: `objects/oDoor/step.gml:1-21`

[^4]: `objects/oTempleFake/step.gml:1-5`

[^5]: `objects/oCeilingTrap/step.gml:5-21`

[^6]: `objects/oCeilingTrap/create.gml:13`

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

[^8]: `objects/oPlayer1/step.gml:1492-1511`

[^9]: `scripts/scrRoomGen4.gml:68-88`

[^10]: `scripts/scrRoomGen4.gml:110-111`

[^11]: `scripts/scrRoomGen4.gml:406-419`

[^12]: `objects/oPlayer1/step.gml:1281`

[^13]: `objects/oCeilingTrap/create.gml:15-19`

[^14]: `objects/oPlayer1/step.gml:1266-1281`

### Source code

- `objects/oCeilingTrap/create.gml`
- `objects/oCeilingTrap/step.gml`
- `objects/oDoor/step.gml`
- `objects/oTempleFake/step.gml`
- `objects/oPlayer1/step.gml`
- `scripts/scrRoomGen4.gml`
