Controls
Verified against the spelunky.ai port v0.1.10 on .
Controls in Spelunky Classic are the arrow keys, Z to jump, X to attack, C for items, A for bombs, S for ropes, Shift to run, P to pay and Escape to pause.
Each action has a key, which the settings program can change, and a gamepad button; the game reads the gamepad first and the keyboard after it, so both work at once [1]. Besides the twelve actions, Escape pauses, Enter and Escape move past the screens between scenes, and a few function keys work on the title screen and the pause screen.
How it works
#The keys
#The game starts with these keys and buttons, then reads the player's own from keys.cfg and
gamepad.cfg, if the settings program has written them [2]
[3].
| Action | Key | Button | What it does | |
|---|---|---|---|---|
| Left, right | ← → | Stick or hat | Walk, and steer in the air | [4] |
| Up | ↑ | Stick or hat | Look up; climb a ladder or rope; go through a door; with attack, open a Chest or Crate | [5] [6] [7] |
| Down | ↓ | Stick or hat | Look down; duck and crawl; with attack, pick an item up; with jump, let go of a ledge | [8] [9] |
| Jump | Z | 2 | Jump; swim up; free the player from a web | [10] |
| Attack | X | 1 | Whip, or use or throw what the player holds; held while walking, run | [11] |
| Item | C | 3 | Take out a Bomb, then a Rope, then put back what the player held | [12] |
| Run | Shift | 5 | Run | [13] |
| Bomb | A | 7 | Throw a lit bomb | [14] |
| Rope | S | 8 | Throw a rope up, or with down, over the ledge in front | [15] |
| Flare | F | 4 | Nothing | [16] |
| Pay | P | 6 | In a shop, buy the item held, a bet or a kiss | [17] |
| Start | Escape | 10 | Pause; move past a screen | [18] |
The keys do nothing while the player is stunned or dead [19], and the bomb and rope keys nothing once he has no hearts left [20]. Up and down move the view once they've been held for 31 steps with the player standing or hanging still, 4 pixels a step, so he can look over a drop [21].
Running
#The player walks at up to 3 pixels per step [22]. He runs, at up to 6, once a run has been held for 10 steps on the ground: the run key counts as held at once, and the attack key, held while he isn't whipping, counts up a step at a time, so holding attack while walking also starts a run [23] [24]. With the settings program's run on down (on by default), ducking while moving faster than 2 pixels per step keeps him running rather than slowing to a crawl [25] [26].
Pausing
#Escape (or the gamepad's start) pauses when the room allows it and the player is alive: the screen darkens, the music goes quiet and everything else stops, so the clock stops too [27]. The clip shows it on the first level: the pause screen lists the level, its depth in feet, the money, the kills, the time on the level and in all, and the saves, with the keys it takes [28] [29].
- Escape returns to the game [30].
- F1 kills the player, which ends the game as any death does, unless an Ankh revives him [31]. It's only shown, and only works, in a level.
- F10 quits Spelunky [32].
With the gamepad on, the screen names its buttons instead: start returns, bomb dies and rope quits [33]. The title screen, once the player stands in it, and the high scores room can be paused too [34] [35].
Other screens
#- The intro and the title screen. Enter, Escape, attack or start skip the intro and the title screen's opening [36] [37]. On the title screen, F2 opens the level editor and F3 the custom levels [38] [39]. Climbing its rope to the top shows the credits and quits [40] [41].
- Music. M turns the music off and on [42].
- Between levels. Attack or start goes on to the next level once the tally has finished; pressed earlier, it hurries the tally (Scoring) [43]. Up and down raise and lower a donation to the Tunnel Man [44].
- Game over. Attack or start first finishes counting the money, then goes to the high scores room [45].
- The ending. Enter, Escape, attack or start skip the volcano and the escape, straight to the final score (Endings) [46] [47].
The gamepad
#The gamepad works when the settings program has turned it on (settings.cfg's fourth line)
[48]. A direction is the hat's or the stick's, and a button may be
one of the first 20 or a trigger [49]
[50].
Numbers
#| Value | ||
|---|---|---|
| Walking, at most | 3 pixels per step (90 per second) | [51] |
| Running, at most | 6 pixels per step (180 per second) | [52] |
| Steps a run is held before the player runs | 10 | [53] |
| Steps up or down is held before the view moves | 31 | [54] |
| The view's speed when it moves | 4 pixels per step | [55] |
Examples
#- The clip above pauses on the first level, resumes, pauses again and dies with F1 [29].
- With keys set in the settings program, the game plays on them: a replay plays with up and down both W, jump and attack both Space, and item and run both E [56].
Quirks
#- The pause screen's keys aren't only the ones it shows. The bomb key kills the player like F1, and the rope key quits like F10, on the keyboard as well as the gamepad [57] [58].
- The flare key does nothing. The game reads it with the others, but the line that would check it is commented out, and so is the code that would light a flare [16] [59]; the settings program never asks for it [57]. A replay presses it in the tutorial, and the oracle's run is the same as without the press [56].
- Playing as the Damsel, the climb out by the title screen's rope shows the Spelunker. She climbs the rope as herself, but the figure that climbs on out of sight at the top is set to her sprite and then, by an "else" that belongs to the Tunnel Man's check, to the Spelunker's [60] [57]. The clip shows her change at the top of the rope [61] [62].
FAQ
#- What are the controls in Spelunky Classic?
The arrow keys move, look and climb, Z jumps, X whips or throws what the player holds, C switches between a bomb, a rope and the held item, A throws a bomb, S throws a rope, Shift runs, P pays in a shop and Escape pauses. Up enters a door.
- How do you run in Spelunky Classic?
Hold Shift while walking, or hold the attack key (X), which starts a run after 10 steps. Running is up to 6 pixels per step, where walking is 3.
- Can you play Spelunky Classic with a gamepad?
Yes, with the gamepad turned on in the settings program. Its stick or hat moves the player, and each action has a button (jump 2, attack 1, item 3, run 5 by default); the keyboard keeps working beside it.
- How do you quit or restart a level in Spelunky Classic?
Pause with Escape: on the pause screen F1 kills the player, which ends the game unless he has an Ankh, and F10 quits Spelunky. The bomb key and the rope key do the same as F1 and F10 there.
- What does the flare key do in Spelunky Classic?
Nothing. The game reads a flare key from its key settings, but the line that would check it is commented out.
Gallery
#See also
#References
#scripts/checkJump.gml:1-4scripts/scrInit.gml:38-59scripts/scrInit.gml:90-140scripts/characterStepEvent.gml:12-26scripts/characterStepEvent.gml:609-610objects/oPlayer1/step.gml:759-766objects/oPlayer1/step.gml:561objects/oPlayer1/step.gml:1203-1209scripts/characterStepEvent.gml:494-505scripts/characterStepEvent.gml:294-338objects/oPlayer1/step.gml:1175-1201objects/oPlayer1/step.gml:954-1044scripts/characterStepEvent.gml:117-121objects/oPlayer1/step.gml:1137-1174objects/oPlayer1/step.gml:1045-1062objects/oPlayer1/step.gml:413objects/oPlayer1/step.gml:1359-1450scripts/checkStartPressed.gml:1-4scripts/characterStepEvent.gml:71-88objects/oPlayer1/step.gml:406-410objects/oPlayer1/step.gml:385-397scripts/characterStepEvent.gml:797-800scripts/characterStepEvent.gml:117-129scripts/characterStepEvent.gml:685-698scripts/characterStepEvent.gml:700-727scripts/scrInit.gml:32objects/oScreen/step_begin.gml:34-61objects/oScreen/step_begin.gml:85-117- Clip controls/pause
objects/oScreen/step_begin.gml:62-72objects/oScreen/keypress_F1.gml:1-11objects/oScreen/keypress_F10.gml:1-2objects/oScreen/step_begin.gml:116-122objects/oTitle/create.gml:72-89objects/oHighscores/create.gml:1objects/oIntro/step.gml:1-4objects/oTitle/step.gml:1-23objects/oTitle/keypress_F2.gml:1-3objects/oTitle/keypress_F3.gml:1-8objects/oPlayer1/step.gml:49-60objects/oCredits1/step.gml:48objects/oGame/keypress_M.gml:1-22objects/oTransition/step.gml:1-33objects/oTransition/step.gml:35-58objects/oPlayer1/step.gml:907-930objects/oEnd/step.gml:1-14objects/oEnd2/step.gml:1-10scripts/scrInit.gml:73-75objects/oGamepad/step.gml:1-57scripts/checkJoyButton.gml:1-23scripts/characterStepEvent.gml:799scripts/characterStepEvent.gml:690scripts/characterStepEvent.gml:685objects/oPlayer1/step.gml:389objects/oPlayer1/step.gml:390- Replay
fidelity/replays/config-keys-tutorial.txt - Quirk 1 (docs/quirks.md)
- Replay
fidelity/replays/flow-pause-game-over-new-game.txt objects/oPlayer1/step.gml:1321-1358objects/oPDummy5/create.gml:6-8- Clip quirks/damsel-title-rope-spelunker
- Replay
fidelity/replays/title-damsel-rope.txt
Source code
scripts/scrInit.gmlscripts/characterStepEvent.gmlobjects/oPlayer1/step.gmlobjects/oScreen/step_begin.gmlobjects/oGamepad/step.gmlscripts/checkJump.gml