Settings
Verified against the spelunky.ai port v0.1.10 on .
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 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) | [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
#References
#scripts/scrInit.gml:61-140scripts/scrInit.gml:30-59- Replay
fidelity/settings/click-through.txt - Replay
fidelity/settings/sound-joy-exit.txt - Replay
fidelity/settings/escape-saves.txt - Quirk 1 (docs/quirks.md)
- Replay
fidelity/settings/key-config.txt - Quirk 5 (docs/quirks.md)
scripts/scrInit.gml:61-83objects/oScreen/create.gml:4-7objects/oBomb/alarm_1.gml:1-5objects/oBlood/alarm_0.gml:1-5scripts/scrInitLevel.gml:226-241scripts/characterStepEvent.gml:700-727objects/oGamepad/step.gml:1objects/oScreen/step_begin.gml:116-122objects/oScreen/create.gml:11-16scripts/scrInit.gml:142-149scripts/scrInit.gml:151-204scripts/scrInit.gml:30-36scripts/scrInit.gml:85-88scripts/scrInit.gml:90-140- Replay
fidelity/replays/config-keys-tutorial.txt scripts/scrInit.gml:90-117scripts/scrInit.gml:119-140scripts/scrInit.gml:142scripts/scrInit.gml:32scripts/scrInit.gml:70-71- Replay
fidelity/settings/down-to-run-not-read.txt objects/oKeyConfig/keypress_anykey.gml:54