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.

# The Compass's arrow off the screen

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

The Compass's arrow off the screen is a quirk of Spelunky Classic in which the Compass's arrow for an exit above the screen is drawn above it, out of sight.

| Quirk     |                                                                                                                                                                                                                               |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status    | GML + Oracle (the view); GML (the drawing)                                                                                                                                                                                    |
| Where     | [`scripts/scrDrawHUD.gml:44-76`](https://spelunky.ai/wiki/source/scripts/scrDrawHUD#L44-L76)                                                                                                                                  |
| Pinned by | `fidelity/replays/item-seed-1-compass-olmec-lair.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 Compass's arrow for an exit above the screen is off it.” |

The [Compass](https://spelunky.ai/wiki/compass) points to the exit with an arrow on the edge of the screen: along the bottom for an
exit below it, and on the left or right edge for one to the side, at the exit's height. Nothing stops that
height from being above the screen. Then the arrow is drawn there too, where no one can see it.

## What happens

In [Olmec's Lair](https://spelunky.ai/wiki/olmecs-lair), the player picks up a Compass, and its arrow points right, at the top of the
screen, toward the exit. He drops into the bottom left of the lair, the screen follows him down, and the
arrow goes up off its top, all but a sliver[^1].

**Clip: The compass arrow leaves the top of the screen.** In Olmec's lair, the player picks up a compass, and its arrow points right, at the top of the screen, toward the exit. When he drops into the bottom of the lair, the view follows him down and the arrow goes up off the top of the screen, all but a sliver. ([video](https://spelunky.ai/wiki/media/clips/quirks/compass-arrow-off-screen/clip.mp4))

## Why

The HUD draws a down arrow for an exit more than a screen's height below the view's top[^2]. For any other exit, one to the left or right gets a side arrow,
drawn at the exit's `y` less the view's:

```gml scripts/scrDrawHUD.gml:66-75
        else if (global.exitX < view_xview[0])
        {
            if (global.messageTimer > 0) draw_sprite(sCompassSmallLeft, -1, 0, global.exitY-view_yview[0]);
            else draw_sprite(sCompassLeft, -1, 0, global.exitY-view_yview[0]);
        }
        else if (global.exitX > view_xview[0]+320-16)
        {
            if (global.messageTimer > 0) draw_sprite(sCompassSmallRight, -1, 304, global.exitY-view_yview[0]);
            else draw_sprite(sCompassRight, -1, 304, global.exitY-view_yview[0]);
        }
```

[`scripts/scrDrawHUD.gml:66-75`](https://spelunky.ai/wiki/source/scripts/scrDrawHUD#L66-L75), 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)).

For an exit above the view, that's a negative `y`, above the top of the screen; one straight above gets no
arrow at all. On a generated level the exit is in the bottom row of rooms, which the view can't go below. In
Olmec's Lair the HUD sets the exit itself, at (640, 544)[^3], and the
lair goes deeper: at its bottom left, with the view's top at y 553 to 556, the right arrow is drawn at y -9
to -12[^4].

## Reproducing it

Carry a Compass into Olmec's Lair and go down into its bottom left: the arrow that points right to the exit
goes off the top of the screen. With seed 1, the lair has a free Compass of its own, buried in a block by the
left wall that Olmec's slams dig through. The replay picks it up, with the view's top at y 536 to 539 and the
arrow at y 5 to 8, then drops into the bottom left, where the view follows him down to 556[^5].

## 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 view's position, which places the
arrow. No option turns it off.

## FAQ

### Why does the Compass's arrow disappear in Olmec's Lair?

The [Compass](https://spelunky.ai/wiki/compass) draws its side arrows at the exit's height on the screen. In [Olmec's Lair](https://spelunky.ai/wiki/olmecs-lair), near the bottom left, the exit is above the screen, so the arrow is drawn above it too, all but a sliver.

### Can the Compass's arrow point up?

No. It has arrows that point down and to the sides, and none that points up. An exit straight above the screen gets no arrow at all.

### Does this happen on ordinary levels?

No. A level's exit is always in its bottom row of rooms, and the screen can't go lower than that, so the exit is never above it. Only Olmec's Lair, whose exit the game places by hand, goes deeper than its exit.

## See also

- **Related:** [Compass](https://spelunky.ai/wiki/compass), [Olmec's Lair](https://spelunky.ai/wiki/olmecs-lair)

## References

[^1]: Clip quirks/compass-arrow-off-screen

[^2]: [`scripts/scrDrawHUD.gml:48-65`](https://spelunky.ai/wiki/source/scripts/scrDrawHUD#L48-L65)

[^3]: [`scripts/scrDrawHUD.gml:44`](https://spelunky.ai/wiki/source/scripts/scrDrawHUD#L44)

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

[^5]: Replay `fidelity/replays/item-seed-1-compass-olmec-lair.txt`

### Source code

- [`scripts/scrDrawHUD.gml`](https://spelunky.ai/wiki/source/scripts/scrDrawHUD)
