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.

Music by George Buzinkai and Jonathan Perry; sound effects made in SFXR. From Spelunky Classic 1.1, © 2008, 2009 Derek Yu and Mossmouth, LLC.

# Unclamped test bombs

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

Unclamped test bombs is a quirk of Spelunky Classic in which the level editor's test starts with as many bombs as were typed, where the menu allows 99 at most.

| Quirk     |                                                                                                                                                                                                                     |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status    | GML + Oracle                                                                                                                                                                                                        |
| Where     | [`scripts/scrTestLevel.gml:93-95`](https://spelunky.ai/wiki/source/scripts/scrTestLevel#L93-L95)                                                                                                                    |
| Pinned by | `fidelity/replays/editor-test-hud-caps.txt`                                                                                                                                                                         |
| Row       | [docs/quirks.md §1, Bugs and leftovers in the 1.1 source](https://github.com/851-labs/spelunky/blob/main/docs/quirks.md#1-bugs-and-leftovers-in-the-11-source): “The editor's test doesn't clamp the start values.” |

A custom level's info sets the hearts, bombs and ropes it starts with. Played from the menu, the game limits them,
the bombs and ropes to 0-99 and the hearts to 1-99. The [level editor](https://spelunky.ai/wiki/level-editor)'s Test button starts the level
with them as they were typed. Only the bombs can be typed in ([Editor info skipping fields](https://spelunky.ai/wiki/editor-info-skips-fields)), and the player's step
caps them at 99 a frame later, so all it shows is a four-digit count on the HUD for the level's first frame.

## What happens

The player finishes the level's info, with 1111 starting bombs, and clicks Test. On the level's first frame, the
HUD shows 1111 bombs, its digits running over the rope icon. On the next, they're 99[^1].

**Clip: A test starts with 1,111 bombs.** The level's info has 1,111 starting bombs, and the player tests it. On the level's first frame the HUD shows 1111 bombs, running over the rope icon; from the next, the player's step has cut them to 99. ([video](https://spelunky.ai/wiki/media/clips/quirks/test-bombs-unclamped/clip.mp4))

## Why

The Test button saves the level and sets the starting values straight from what was typed:

```gml scripts/scrTestLevel.gml:93-95
    global.plife = real(lifeStart);
    global.bombs = real(bombStart);
    global.rope = real(ropeStart);
```

[`scripts/scrTestLevel.gml:93-95`](https://spelunky.ai/wiki/source/scripts/scrTestLevel#L93-L95), from `spelunky.gmk`, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC ([Spelunky User License v1.1b](https://spelunky.ai/LICENSE.txt)).

The test room then loads the level with `scrLoadLevel(-1)`[^2], and
the -1 skips the rounding down and the limits that a level played from the menu gets[^3][^4]. The HUD draws the bombs' count after their
icon, where four digits reach past the rope icon[^5]. From the next frame,
the player's step caps the hearts, bombs and ropes at 99[^6].

## Reproducing it

In the level editor, click Edit, press Enter twice to reach START BOMBS, clear it with Backspace, type a number
over 99, and finish the info; then click Test. Every key types twice in the editor, so typing 1 makes 11, and one
Backspace deletes two digits. Few players type more than 99 bombs,
and the count only shows for a frame. In the clip's replay the bombs are typed as 1111, and the test level loads
on frame 548 with 1111 bombs, which are 99 on 549[^7].

## In the port

The spelunky.ai port reproduces it exactly: it's in docs/quirks.md's list of the 1.1 source's bugs[^4], and the oracle's fingerprint of the replay pins the 1111 bombs and the cap. No option turns it
off.

## FAQ

### Can you start a custom level with more than 99 bombs in Spelunky Classic?

Only for a moment, in the level editor's test. The test starts with the bombs typed into the level's info, however many, but the player's step cuts them to 99 from the level's second frame. Played from the menu, a level starts with at most 99.

### Why does the HUD show 1111 bombs for a moment?

The test sets the bombs to what was typed without limiting them, and the HUD draws them on the level's first frame, before the player's step has capped them to 99. Four digits run over the rope icon.

### Can the test start with more hearts or ropes too?

The test doesn't limit them either, but the editor's info prompt skips the hearts and the ropes, so only the bombs can be typed in.

## See also

- **Related:** [Level editor](https://spelunky.ai/wiki/level-editor), [Bombs and ropes](https://spelunky.ai/wiki/bombs-and-ropes)

## References

[^1]: Clip quirks/test-bombs-unclamped

[^2]: [`objects/oLoadLevel/create.gml:84-87`](https://spelunky.ai/wiki/source/objects/oLoadLevel/create#L84-L87)

[^3]: [`scripts/scrLoadLevel.gml:138-148`](https://spelunky.ai/wiki/source/scripts/scrLoadLevel#L138-L148)

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

[^5]: [`scripts/scrDrawHUD.gml:27-40`](https://spelunky.ai/wiki/source/scripts/scrDrawHUD#L27-L40)

[^6]: [`objects/oPlayer1/step.gml:9-11`](https://spelunky.ai/wiki/source/objects/oPlayer1/step#L9-L11)

[^7]: Replay `fidelity/replays/editor-test-hud-caps.txt`

### Source code

- [`scripts/scrTestLevel.gml`](https://spelunky.ai/wiki/source/scripts/scrTestLevel)
- [`scripts/scrLoadLevel.gml`](https://spelunky.ai/wiki/source/scripts/scrLoadLevel)
- [`scripts/scrDrawHUD.gml`](https://spelunky.ai/wiki/source/scripts/scrDrawHUD)
- [`objects/oPlayer1/step.gml`](https://spelunky.ai/wiki/source/objects/oPlayer1/step)
