SpelunkyFan wiki

Spikes

Verified against the spelunky.ai port v0.1.10 on .

Spikes are a trap in Spelunky Classic, a row of points on the ground that kills the player who falls onto them, whatever his hearts, but not one walking across.

Spikes stand on top of a block, in pits and along floors, in the Mines, the Jungle and the Ice Caves. They don't move and never wear out: they hurt only what falls onto them, and kill it outright, the player included. Walking over them on level ground is safe.

How it works

#
Falling onto spikes. The player walks across two spikes on the floor unhurt, then walks off a ledge onto a row of spikes below and dies on them.

Spikes do nothing on their own: the player's and the monsters' code each step checks whether they're falling onto some. The player dies on them if, touching them, he's moving down and has been falling for more than 4 steps, or is stunned [2]. The clip shows both sides of the rule: the player walks across two Spikes on the floor unhurt, then walks off a ledge onto a row of them one block down and dies as he lands.

A player who dies on them stays on them, sinking slowly into the points, and drips blood [3] [4]. The Spikes he dies on turn bloody [5].

Damage

#
VictimWhat happens
The playerLoses 99 hearts, every heart he can have, if he has been falling for more than 4 steps or is stunned[6]
Most monstersKilled (hit points set to 0) if falling faster than 2 pixels a step[7]
A DamselKilled if falling faster than 2 pixels a step[8]

A death on Spikes is counted in the end-of-game statistics' spikes row [9]. A monster killed on them doesn't count as the player's kill [10]. The monsters' check is in the code most monsters share, so those whose own step event replaces it, such as the Bat and the Giant Spider, fall onto Spikes unharmed.

Locations

#

Spikes are placed by the room templates' spike tiles, on top of a block. Most of these tiles hold Spikes with a 1 in 3 chance; some are always Spikes:

AreaSpikes
The Mines1 in 3 for each spike tile[11]
The Jungle1 in 3 for each spike tile, and always on the floor of one pit room, all spike tiles[12]
The Black MarketAs the Jungle[13]
The Ice CavesAlways, on every spike tile[14]
A Yeti lair1 in 3 for each spike tile, and always on its own spike-floored tiles[15] [16]

They're also in the Moon challenge room, a bonus room [17], and in custom levels as the level editor's tile ^ [18].

Avoiding

#
  • Walk, don't drop. Walking across Spikes on level ground is safe. Jumping onto them, or walking off a ledge onto them, is a fall of more than 4 steps, which kills.
  • Don't land on them stunned. A stunned player dies on Spikes however short his fall, so a hit that knocks him onto them kills him.
  • Remove the block under them. Spikes are destroyed with the block they stand on [19], and a Bomb's blast or a Mattock removes any Spikes left with nothing under them [20] [21].
  • Spike Shoes don't help: the player's check for Spikes doesn't look at them.

Interactions

#
  • Boulders destroy the Spikes on the blocks they break [22].
  • Treasure. Level generation doesn't put gold or gems on a block with Spikes on it [23], and the locked chest of the Udjat Eye's level avoids them too [24].
  • A stunned monster thrown onto them dies, if it runs the shared code, as on any fast fall onto Spikes.

Trivia

#
  • Spikes have no code of their own beyond being breakable: everything they do is in the code of what falls onto them [25].
  • Level generation once lined the bottom of the Ice Caves with Spikes: the line is still there, commented out, beside the dark rock it lays instead [26].

FAQ

#
Do spikes kill you instantly in Spelunky Classic?

Only when the player falls onto them. Landing on Spikes after falling for more than 4 steps, or while stunned, takes every heart he has. Walking across them, or standing on them, does nothing.

Can you walk on spikes in Spelunky Classic?

Yes. Spikes only hurt the player while he's falling onto them, so walking across them on level ground is safe. Jumping onto them, or dropping onto them from a ledge, kills him.

Do Spike Shoes protect you from spikes in Spelunky Classic?

No. Nothing protects the player from falling onto Spikes: the check for them looks only at how he's falling. Spike Shoes make his stomps stronger, nothing more.

How do you get rid of spikes in Spelunky Classic?

By destroying the block they stand on, with a Bomb or a Mattock: Spikes go with the block under them.

See also

#

References

#
  1. objects/oPlayer1/step.gml:1693-1710
  2. objects/oPlayer1/step.gml:1682-1693
  3. objects/oPlayer1/step.gml:1685-1691
  4. objects/oPlayer1/step.gml:1810-1813
  5. objects/oPlayer1/step.gml:1705-1709
  6. objects/oPlayer1/step.gml:1693-1703
  7. objects/oEnemy/step.gml:108-128
  8. objects/oDamsel/step.gml:93-110
  9. objects/oPlayer1/step.gml:1697
  10. objects/oEnemy/step.gml:120
  11. scripts/scrRoomGen.gml:343
  12. scripts/scrRoomGen2.gml:351-352
  13. scripts/scrRoomGenMarket.gml:266-267
  14. scripts/scrRoomGen3.gml:307
  15. scripts/scrRoomGenYeti.gml:317
  16. scripts/scrRoomGenYeti.gml:423-426
  17. Room rMoon, as the room editor placed it
  18. scripts/scrCreateTileObj.gml:225-228
  19. objects/oSolid/destroy.gml:9-13
  20. objects/oExplosion/collision_oSolid.gml:22-28
  21. objects/oMattockHit/other_animation_end.gml:30-36
  22. objects/oBoulder/collision_oSolid.gml:16-23
  23. scripts/scrTreasureGen.gml:32-37
  24. scripts/scrEntityGen.gml:81-93
  25. objects/oSpikes/create.gml:1-3
  26. scripts/scrInitLevel.gml:131-137
  27. objects/oEnemy/step.gml:108-124

Source code

  • objects/oSpikes/create.gml
  • objects/oPlayer1/step.gml
  • objects/oEnemy/step.gml
  • objects/oDamsel/step.gml
  • objects/oSolid/destroy.gml
  • objects/oExplosion/collision_oSolid.gml
  • scripts/scrRoomGen.gml
  • scripts/scrRoomGen2.gml
  • scripts/scrRoomGen3.gml
#