SpelunkyFan wiki

Spelunker

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

The Spelunker is the player character in Spelunky Classic, an explorer who goes down through the caves with 4 hearts, 4 bombs and 4 ropes.

Everything in the game happens around him: he starts at a level's entrance, and the level ends when he goes through its exit, carrying what he can [2] [3]. The keys that move him are on the Controls page, his hearts on Health's, and what hurts him on Damage and stun's; this page is about the character: how he moves, what he carries, how he dies, and who can take his place.

Behaviour

#

Moving

#
The Spelunker's moves. In the tutorial, the Spelunker walks off a ledge, looks up, ducks, and clears a step with a short jump and a long one. He jumps at a ledge with right held and hangs from its edge, climbs up with a jump, and runs off the far side.

He walks at up to 3 pixels per step (90 per second) and runs at up to 6 pixels per step (180 per second) while the run key is held on the ground, or once attack has been held for 10 steps of walking [4] [5] [6]. A jump from the ground goes higher the longer jump is held, up to 10 steps, and farther from a run [7]; the Spring Shoes give it half as much push again [8]. Holding up while standing still, he looks up [9]; holding down, he ducks, and moves while ducking at a crawl [10] [11]. Down on a ladder's top climbs down the ladder, and on any other platform he can stand on drops through it [12].

Hanging. Falling against a wall with the key toward it held, he grabs its edge and hangs, if there's no block above the edge and none under his feet. The Climbing Gloves let him grab any wall, and a tree's trunk or an Arrow stuck in a wall can be hung from too [13]. Jump climbs up from a hang, jump with the key away from the wall lets go, and down with jump drops [14]. In the clip, he jumps at a ledge with right held, hangs from it, and climbs up with a jump [15].

Climbing and crawling. In the tutorial, the Spelunker jumps onto a ladder and climbs it, then jumps off to the left and opens a chest. Ducking, he crawls over the edge of a step, flips round to hang from it, lets go, and walks off the steps into a fall that stuns him.

Climbing and crawling. Up beside a ladder or a Rope climbs onto it [16]. Crawling toward the edge he's ducking on, he flips over it into a hang, dropping what he holds [17]. The clip shows both, in the tutorial: a ladder, then a crawl off a step into a flip hang, and a long fall that stuns him [18].

Water and webs. In water he sinks slowly and can jump out from its surface. A Web holds him nearly still, cutting his speed to a fifth each step, and each jump in it wears the web down [19] [20]. A ball and chain holds him within 24 pixels of the ball, so he can't climb away from it [21].

What he carries

#

He holds one item at a time in his hands: down and attack beside an item picks it up, and attack throws it (Throwing) [22]. Equipment isn't held but worn: picking up a free piece, or paying for one, puts it on for the rest of the game [23] [24]. Bombs and Ropes are counts, which the item key takes out into his hands in turn [25]. His hearts, bombs and ropes stop at 99 [26].

Going through a level's exit, he takes a light item to the next level in his hands, puts an unlit bomb or a rope back in his count, and leaves a heavy one behind. A Golden Idol is cashed in, and a living Damsel is saved [27].

Hurt, stunned and killed

#
The Spelunker's death. The Spelunker ducks, drops a bomb at his feet and stands on it. The blast takes his four hearts and flings his body away, and the game is over.

He starts a game with 4 hearts, 4 bombs and 4 ropes [28]. Monsters, traps, explosions and long falls take hearts and often stun him; while stunned he ignores every key and drops what he holds (Damage and stun, which has every source and its hearts). Stomping a monster and the Whip are his own attacks.

With no hearts left on a level, he dies, unless he wears the Ankh: his hearts are set to 0, the HUD goes and the game's records are updated [29], and "GAME OVER" shows [30]. His body still takes damage, and once his hearts are below −99 it bursts into blood and vanishes [31]. In the clip, he drops a Bomb at his feet and stands on it [32]. Attack or start then finishes counting the money, and pressed again goes to the high scores room, with everything cleared for a new game [33].

Ankh revival. The player picks up the Black Market's ankh and jumps out of the shop with it, which puts it on and angers the shopkeeper. Dropping back into the shop, he is shot until his hearts run out; the ankh shatters and he comes back to life at the level's entrance with 4 hearts.

With the Ankh, he comes back with 4 hearts, "THE ANKH SHATTERS!", invincible for 2 seconds, and the Ankh is gone: at the level's entrance, or inside the Moai while it's active, or at a set place near the left wall in Olmec's Lair [34].

The deaths table. When Spelunky closes, it writes stats.txt, with a table of deaths by level, one by monster and one by everything else (rock, explosion, crushed, long fall, spikes, boulder, the traps, the pit and lava) [35] [36]. Each death is tallied by the code that deals it, on a real level only [37]. Some rows don't count what they say: the explosion row counts the blasts he survives, a few monsters' kills are never tallied (Damage and stun) [38], and nothing adds to the boulder row, as a boulder kills by crushing, which is tallied as crushed [39] [40] [38] [41]. A death adds to its level's row only when the player leaves the game over screen with attack or start, so closing the game on that screen leaves it out [42] [38] [43]. Pausing on the step after a monster takes his last heart, before his own step sees it, catches him still alive, and quitting from the pause then leaves the whole game out of the high scores too: its play, its death and any record it set [38] [44].

Interactions

#

Playing as someone else

#
The Changing Room. With eight Damsels saved, the high scores room has a gold trophy and a door beside it. The Spelunker climbs up to the door and goes in, and comes out as the Damsel, who walks back out to the title screen.

Two doors change who the player is, and each changes him back the next time:

DoorWhere it isWhoStarts with
The Changing RoomThe high scores room, beside the gold trophy for 8 Damsels saved in a gameThe Damsel4 hearts, 4 bombs, 4 ropes[45] [46]
The Tunnel Man's doorThe title screen, once all four gold trophies are earnedThe Tunnel Man2 hearts, no bombs, no ropes[47] [48]

The Damsel plays as the Spelunker does, with her own sprites, and the Damsels to rescue become Spelunkers (playing as her). The Tunnel Man swings a Mattock in place of the Whip, only on the ground, and can't jump in the middle of a swing (playing as him) [49] [50]. Who the player is lasts until Spelunky is closed, and a new game starts each with their own hearts, bombs and ropes [51] [28]. In the clip, the Spelunker goes into the Changing Room and comes out as the Damsel [52].

Locations

#
Where
Every levelAt its entrance[2]
Olmec's LairPlaced in the room, at its start[53]
The tutorial, the high scores room and the bonus roomsPlaced in the room[54] [55] [56] [57] [58]
The title screenClimbing down its rope when the game starts, or by the door or the rope he came back by[59] [60] [61]
A custom levelAt its entrance, or in the corner without one[62]

On the title screen and in the high scores room his hearts are set back to the start's on every step, so nothing there kills him [63].

Trivia

#
  • The player's object is oPlayer1, and his code sets player = 1, with the comment "player 2 uses different keyboard keys than player 1"; there's no player 2 [64].
  • His create event keeps two values "for debugging": how many levels an exit moves him on, 1 [65] [66].
  • A new game still gives him 3 flares, "not used any more" [67].
  • His body is never destroyed. Eaten by a Mantrap, crushed, or burst into blood, it's hidden and held still where it was: "instead of destroying the player instance when dead, we occasionally make him disappear" [68].

FAQ

#
Who is the Spelunker in Spelunky Classic?

The explorer the player controls, in a wide hat with a lamp on it. The game gives him no name: it's the player, "I" in his own messages ("I CAN'T SEE A THING!"). The Damsel and the Tunnel Man can be played in his place once they're unlocked.

How many hearts, bombs and ropes does the Spelunker start with in Spelunky Classic?

4 hearts, 4 bombs and 4 ropes, as the Damsel does. The Tunnel Man starts with 2 hearts and no bombs or ropes. None can have more than 99 of any.

What kills the Spelunker instantly in Spelunky Classic?

Falling onto spikes, lava, being crushed, falling out of the bottom of a level, a ghost's touch and a Mantrap, which eats him: each takes 99 hearts or kills him outright. A bomb's blast takes 10 hearts on each step he's in it, more than a new game's 4.

What happens when the Spelunker dies in Spelunky Classic?

The game is over, unless he wears the Ankh, which brings him back to life with 4 hearts. The high scores take in the game as he dies; then the money is counted up, attack or start goes to the high scores room, and a new game starts from the title screen with nothing kept.

How do you play as someone else in Spelunky Classic?

Save 8 Damsels in one game for the Damsel, whose door is in the high scores room, or earn all four gold trophies for the Tunnel Man, whose door is on the title screen. Going through the door again changes back to the Spelunker.

#
Long drop. The player walks off a ledge and falls about twenty blocks. He lands on his 35th step of falling, loses two of his four hearts and lies stunned for two seconds before he can move again.

See also

#

References

#
  1. scripts/scrClearGlobals.gml:111
  2. scripts/scrInitLevel.gml:202-203
  3. objects/oPlayer1/step.gml:756-880
  4. scripts/characterStepEvent.gml:117-129
  5. scripts/characterStepEvent.gml:685-698
  6. scripts/characterStepEvent.gml:797-800
  7. scripts/characterStepEvent.gml:338-380
  8. scripts/characterStepEvent.gml:357
  9. scripts/characterStepEvent.gml:382-392
  10. scripts/characterStepEvent.gml:539-546
  11. scripts/characterStepEvent.gml:700-727
  12. scripts/characterStepEvent.gml:546-578
  13. scripts/characterStepEvent.gml:400-469
  14. scripts/characterStepEvent.gml:494-529
  15. Clip spelunker/moves
  16. scripts/characterStepEvent.gml:606-632
  17. scripts/characterStepEvent.gml:803-866
  18. Clip spelunker/climb
  19. scripts/characterStepEvent.gml:294-319
  20. scripts/characterStepEvent.gml:743-771
  21. scripts/characterStepEvent.gml:898-927
  22. objects/oPlayer1/step.gml:1203-1215
  23. objects/oPlayer1/step.gml:1297
  24. objects/oPlayer1/step.gml:1359-1390
  25. objects/oPlayer1/step.gml:954-1044
  26. objects/oPlayer1/step.gml:9-11
  27. objects/oPlayer1/step.gml:767-851
  28. scripts/scrClearGlobals.gml:103-114
  29. objects/oPlayer1/step.gml:1849-1921
  30. objects/oGame/draw.gml:12
  31. objects/oPlayer1/step.gml:1484-1488
  32. Clip spelunker/death
  33. objects/oPlayer1/step.gml:907-941
  34. objects/oPlayer1/step.gml:1853-1896
  35. objects/oScreen/other_game_end.gml:21
  36. scripts/scrWriteStats.gml:83-172
  37. objects/oPlayer1/step.gml:1513-1703
  38. Quirk 1 (docs/quirks.md)
  39. scripts/scrWriteStats.gml:162
  40. objects/oPlayer1/step.gml:1492-1511
  41. Replay fidelity/replays/trap-boulder-crush.txt
  42. objects/oPlayer1/step.gml:917
  43. Replay fidelity/replays/flow-pause-game-over-new-game.txt
  44. Replay fidelity/replays/flow-pause-dying-quit-seed-1.txt
  45. objects/oHighscores/create.gml:86-102
  46. objects/oPlayer1/other_animation_end.gml:173-191
  47. objects/oTitle/create.gml:54-58
  48. objects/oPlayer1/other_animation_end.gml:192-218
  49. objects/oPlayer1/step.gml:1181-1200
  50. scripts/characterStepEvent.gml:51-59
  51. objects/oGlobals/create.gml:46-47
  52. Clip spelunker/change
  53. Room rOlmec, as the room editor placed it
  54. Room rTutorial, as the room editor placed it
  55. Room rHighscores, as the room editor placed it
  56. Room rSun, as the room editor placed it
  57. Room rMoon, as the room editor placed it
  58. Room rStars, as the room editor placed it
  59. objects/oTitle/alarm_3.gml:1
  60. objects/oPDummy4/step.gml:1-32
  61. objects/oTitle/create.gml:64-93
  62. scripts/scrLoadLevel.gml:164-173
  63. objects/oPlayer1/step.gml:2-7
  64. scripts/characterCreateEvent.gml:54
  65. objects/oPlayer1/create.gml:4-6
  66. objects/oPlayer1/step.gml:875-876
  67. scripts/scrClearGlobals.gml:115
  68. objects/oPlayer1/step.gml:62-71
  69. objects/oPlayer1/step.gml:1614-1627
  70. objects/oBullet/collision_oCharacter.gml:1-17
  71. objects/oGhost/collision_oCharacter.gml:1-16
  72. objects/oManTrap/collision_oCharacter.gml:20-47

Source code

#