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.

# Settings

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

Settings in Spelunky Classic are the screen size, detail, controls and volumes that the settings program, config.exe, saves for the game to read when it starts.

The settings program is a second program beside the game, with a window of check boxes and sliders, and screens
that ask for keys and gamepad buttons. It writes three files, `settings.cfg`, `keys.cfg` and `gamepad.cfg`, and the
game reads them once, as it starts[^1]; nothing in the game changes them.
Without the files the game has defaults of its own[^2], but the released game
ships all three: a window three times the game's size, high detail, running on down off, the gamepad on, both
volumes at 15, and the keys on the [Controls](https://spelunky.ai/wiki/controls) page.

## How it works

### The settings program

The program's window lists, from the top[^3]:

- **RESOLUTION:** X1 to X4, the window's size in multiples of the game's 320 by 240 pixels.
- **GRAPHICS:** FULLSCREEN and HIGH DETAIL.
- **CONTROLS:** DOWN KEY TO RUN and USE GAMEPAD, with the KEY CONFIG and JOY CONFIG buttons.
- **SOUND/MUSIC VOLUME:** a slider each for the music (MUS) and the sound effects (SFX). Dragging the music's plays
  the cave music at the volume it's at[^3], and the sound's plays
  the jump sound every 20 steps[^4].
- **START GAME ON EXIT**, checked at first.

Each box is a click on or off. OK saves the settings and quits, starting the game if START GAME ON EXIT is
checked[^3]. Escape and the window's close button save and
quit[^5]; EXIT quits without
saving[^4], and so does Enter[^6].

### Keys and gamepad buttons

KEY CONFIG saves the settings, then names each action in turn, with its key under CURRENT: UP, DOWN, LEFT, RIGHT,
JUMP, ACTION, SWITCH, RUN, BOMB, ROPE and PURCHASE. A key press binds the action shown and Escape keeps its key;
after the last, the program writes `keys.cfg` and goes back to its window. It never asks for the flare key, which
keeps what the file had[^7][^6]. Each key press
counts twice, so one press binds two actions in a row (Escape keeps two): six presses bind all
eleven[^8]. JOY CONFIG does the same for the gamepad's buttons (JUMP, ACTION, SWITCH, RUN, BOMB,
ROPE, PURCHASE and START) and `gamepad.cfg`; with no gamepad, it says NO GAMEPAD FOUND! and only Escape moves it
on[^4].

### What the game does with them

The game reads `settings.cfg` a line a setting[^9]:

| Setting         | Without the file | Released | In the game                                                                                                                 |                 |
| --------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------- | --------------- |
| Fullscreen      | On               | Off      | The game starts full screen or in a window                                                                                  | [^10]           |
| High detail     | On               | On       | A bomb's explosion leaves flames, flying blood leaves a trail, and each level gets 20 background details; off, none of them | [^11][^12][^13] |
| Down key to run | On               | Off      | Ducking while moving fast keeps the player running ([Controls](https://spelunky.ai/wiki/controls#running))                  | [^14]           |
| Use gamepad     | Off              | On       | The game reads the gamepad, and its signs and messages name its buttons rather than keys                                    | [^15][^16]      |
| Resolution      | 3                | 3        | The window's size: the game's 320 by 240 pixels at 1 to 4 times                                                             | [^17]           |
| Music volume    | 15               | 15       | Every piece of music's volume                                                                                               | [^18]           |
| Sound volume    | 15               | 15       | Every sound effect's volume                                                                                                 | [^19]           |

The defaults are the game's own, for a game directory without the file[^20].
Each volume is 0 to 17 in the game, a higher one read as 17[^21]. `keys.cfg`
holds a key for each of the twelve actions and `gamepad.cfg` a button for nine, in the order the game reads
them[^22], and a replay with keys of its own plays on
them[^23].

## Numbers

|                               | Settings program | Game    |           |
| ----------------------------- | ---------------- | ------- | --------- |
| Music and sound volume        | 2 to 19          | 0 to 17 | [^21][^5] |
| Actions with a key            | 11               | 12      | [^24][^7] |
| Actions with a gamepad button | 8                | 9       | [^25][^4] |

A volume is turned into the sound library's units as 2000 + 8000 × the volume ÷
18[^26].

## Examples

- Clicking every box, setting X1 and dragging the music to 7, then OK, saves `1 0 1 0 1 7
  15`[^3].
- A sound volume of 30 is read as 19, and Escape saves it so[^5].
- KEY CONFIG with W, Escape, Space, E, Q and P binds up and down to W, keeps left and right, and binds jump and
  attack to Space, item and run to E, bomb and rope to Q, and pay to
  P[^7].

## Quirks

- **The settings program never reads DOWN KEY TO RUN.** It starts the setting off and its reading of the file can
  only turn it off, so the box always comes up unchecked, and saving writes it off again. The game reads it as it
  should, starting it on[^27][^28]. A replay
  opens the program on a file with the setting on, and Escape saves it
  off[^29][^6].
- **The volumes' top notches.** The program's sliders go up to 19 and the game reads at most 17, so 17, 18 and 19
  are the same in the game[^21][^4][^6].
- **Enter quits without saving**, where Escape saves first, and the flare key is never asked
  for[^6].
- **The game has the key screens too.** The game's own files have a copy of the program's key and gamepad screens,
  which nothing in the game reaches[^30][^6].

## FAQ

### How do you change the controls in Spelunky Classic?

With the settings program, config.exe, that comes with the game. Its KEY CONFIG button asks for a key for each action and its JOY CONFIG button a gamepad button; the game reads them the next time it starts.

### How do you make Spelunky Classic bigger or fullscreen?

In the settings program: RESOLUTION picks a window of 1 to 4 times the game's 320 by 240 pixels, and FULLSCREEN fills the screen. The released game starts windowed, at 3 times.

### What does high detail do in Spelunky Classic?

It adds flames to bombs' explosions, trails to flying blood and background details to the levels. Turned off, the game leaves them out.

### Does Spelunky Classic have a settings menu in the game?

No. The settings are a separate program, config.exe, run before the game, which reads them as it starts. In the game, M turns the music off and on.

## See also

- **Related:** [Controls](https://spelunky.ai/wiki/controls), [Scoring](https://spelunky.ai/wiki/scoring), [Versions](https://spelunky.ai/wiki/versions)

## References

[^1]: [`scripts/scrInit.gml:61-140`](https://spelunky.ai/wiki/source/scripts/scrInit#L61-L140)

[^2]: [`scripts/scrInit.gml:30-59`](https://spelunky.ai/wiki/source/scripts/scrInit#L30-L59)

[^3]: Replay `fidelity/settings/click-through.txt`

[^4]: Replay `fidelity/settings/sound-joy-exit.txt`

[^5]: Replay `fidelity/settings/escape-saves.txt`

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

[^7]: Replay `fidelity/settings/key-config.txt`

[^8]: Quirk 5 (docs/quirks.md)

[^9]: [`scripts/scrInit.gml:61-83`](https://spelunky.ai/wiki/source/scripts/scrInit#L61-L83)

[^10]: [`objects/oScreen/create.gml:4-7`](https://spelunky.ai/wiki/source/objects/oScreen/create#L4-L7)

[^11]: [`objects/oBomb/alarm_1.gml:1-5`](https://spelunky.ai/wiki/source/objects/oBomb/alarm_1#L1-L5)

[^12]: [`objects/oBlood/alarm_0.gml:1-5`](https://spelunky.ai/wiki/source/objects/oBlood/alarm_0#L1-L5)

[^13]: [`scripts/scrInitLevel.gml:226-241`](https://spelunky.ai/wiki/source/scripts/scrInitLevel#L226-L241)

[^14]: [`scripts/characterStepEvent.gml:700-727`](https://spelunky.ai/wiki/source/scripts/characterStepEvent#L700-L727)

[^15]: [`objects/oGamepad/step.gml:1`](https://spelunky.ai/wiki/source/objects/oGamepad/step#L1)

[^16]: [`objects/oScreen/step_begin.gml:116-122`](https://spelunky.ai/wiki/source/objects/oScreen/step_begin#L116-L122)

[^17]: [`objects/oScreen/create.gml:11-16`](https://spelunky.ai/wiki/source/objects/oScreen/create#L11-L16)

[^18]: [`scripts/scrInit.gml:142-149`](https://spelunky.ai/wiki/source/scripts/scrInit#L142-L149)

[^19]: [`scripts/scrInit.gml:151-204`](https://spelunky.ai/wiki/source/scripts/scrInit#L151-L204)

[^20]: [`scripts/scrInit.gml:30-36`](https://spelunky.ai/wiki/source/scripts/scrInit#L30-L36)

[^21]: [`scripts/scrInit.gml:85-88`](https://spelunky.ai/wiki/source/scripts/scrInit#L85-L88)

[^22]: [`scripts/scrInit.gml:90-140`](https://spelunky.ai/wiki/source/scripts/scrInit#L90-L140)

[^23]: Replay `fidelity/replays/config-keys-tutorial.txt`

[^24]: [`scripts/scrInit.gml:90-117`](https://spelunky.ai/wiki/source/scripts/scrInit#L90-L117)

[^25]: [`scripts/scrInit.gml:119-140`](https://spelunky.ai/wiki/source/scripts/scrInit#L119-L140)

[^26]: [`scripts/scrInit.gml:142`](https://spelunky.ai/wiki/source/scripts/scrInit#L142)

[^27]: [`scripts/scrInit.gml:32`](https://spelunky.ai/wiki/source/scripts/scrInit#L32)

[^28]: [`scripts/scrInit.gml:70-71`](https://spelunky.ai/wiki/source/scripts/scrInit#L70-L71)

[^29]: Replay `fidelity/settings/down-to-run-not-read.txt`

[^30]: [`objects/oKeyConfig/keypress_anykey.gml:54`](https://spelunky.ai/wiki/source/objects/oKeyConfig/keypress_anykey#L54)

### Source code

- [`scripts/scrInit.gml`](https://spelunky.ai/wiki/source/scripts/scrInit)
- [`objects/oScreen/create.gml`](https://spelunky.ai/wiki/source/objects/oScreen/create)
- [`objects/oGamepad/step.gml`](https://spelunky.ai/wiki/source/objects/oGamepad/step)
