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.

# Olmec sitting in the lava

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

Olmec sitting in the lava is a quirk of Spelunky Classic in which Olmec, dug down into the lava by the left wall of his lair, sits in it without drowning.

| Quirk     |                                                                                                                                                                                                                             |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status    | GML + Oracle                                                                                                                                                                                                                |
| Where     | [`objects/oOlmec/step.gml:35-43`](https://spelunky.ai/wiki/source/objects/oOlmec/step#L35-L43)                                                                                                                              |
| Pinned by | `fidelity/replays/ending-seed-1.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): “Olmec at the left wall sits in the lava without drowning.” |

[Olmec](https://spelunky.ai/wiki/olmec) can only die in [lava](https://spelunky.ai/wiki/lava), when his slams have dug him down through the floor of his lair
into it ([Beating Olmec](https://spelunky.ai/wiki/beating-olmec)). By the lair's left wall, they dig him into it all the same, but
there it can't kill him: he sits on the lava's floor, out of sight, and goes on hopping out of it and landing
back in it unharmed.

## What happens

Olmec's last slam takes him down by the left wall of his lair into the lava, where he sits out of sight
without drowning. When he hops out of it and drifts right, toward the player, off the wall, he starts to sink[^1].

**Clip: Olmec at the left wall sits in the lava without drowning.** Olmec's last slam takes him down by the left wall of his lair into the lava, where he sits out of sight without drowning. When he hops out of it and drifts right, toward the player, off the wall, he starts to sink. ([video](https://spelunky.ai/wiki/media/clips/quirks/olmec-lava-left-wall/clip.mp4))

## Why

Olmec tests for lava at two points on his left edge, his `x`: under his feet, which starts him drowning, and
over his top, which kills him:

```gml objects/oOlmec/step.gml:35-43
if (collision_point(x, y+64, oLava, 0, 0)) status = DROWNING;

if (collision_point(x, y-2, oLava, 0, 0))
{
    global.enemyKills[21] += 1;
    oFinalBoss.olmecDead = true;
    global.kills += 1;
    instance_destroy();
}
```

[`objects/oOlmec/step.gml:35-43`](https://spelunky.ai/wiki/source/objects/oOlmec/step#L35-L43), 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)).

But his body starts 2 pixels right of `x`[^2], and his step bumps him
a pixel right while his body touches a wall on its left[^3]:

```gml objects/oOlmec/step.gml:22-27
if (isCollisionLeft(1))
{
    x += 1;
    xVel = 0;
    //if (xVel < 0) xVel = -xVel * 0.8;
}
```

[`objects/oOlmec/step.gml:22-27`](https://spelunky.ai/wiki/source/objects/oOlmec/step#L22-L27), 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)).

So drifting into the left wall, he comes to rest at x 15, his body a pixel off the wall and his `x` in the
wall's column, x 0 to 15, where neither point is ever lava. Only a hop's drift takes him off it, and in the
air he drifts right only if the player is past his right side on the step his drift is decided[^4]. With the player over him he doesn't drift, and the player
can't be left of him there[^5].

## Reproducing it

Let Olmec's slams dig him down by the left wall of his lair, and stay over him as he hops. The replay of a whole
game with seed 1 shows it: his last slam lands him in the lava at x 15, on its floor, his top 32 pixels under
its surface. His `x` stays 15 through a hop that, with the player to his right, drifts him right, and he starts
to drown 2 pixels off the wall[^6]. Another run keeps him there
longer, with the player on a rope above him through two hops, until a third, with the player to his right,
drifts him off[^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[^5], and the oracle's fingerprints of both replays pin his position and the step he starts to
drown. No option turns it off.

## FAQ

### Why won't Olmec die in the lava?

If his slams dig him into the [lava](https://spelunky.ai/wiki/lava) by the left wall of [his lair](https://spelunky.ai/wiki/olmecs-lair), both of his checks for lava test a point inside the wall, where there's never any. He sits in it, out of sight, until a hop drifts him off the wall.

### How do you get Olmec off the left wall?

Stand to his right, past his right side, as he hops: his hops drift him toward the player, and only a player that far right makes him drift right. Off the wall, he stops, sinks and dies.

### Can Olmec stay in the lava for good?

Yes. A player who stays over him keeps him there as long as he likes, as one run does from a rope above him, through two hops. By the wall, the player can't get to his left.

## See also

- **Related:** [Olmec](https://spelunky.ai/wiki/olmec), [Lava](https://spelunky.ai/wiki/lava), [Olmec's Lair](https://spelunky.ai/wiki/olmecs-lair), [Beating Olmec](https://spelunky.ai/wiki/beating-olmec)

## References

[^1]: Clip quirks/olmec-lava-left-wall

[^2]: [`objects/oOlmec/create.gml:3`](https://spelunky.ai/wiki/source/objects/oOlmec/create#L3)

[^3]: [`scripts/isCollisionLeft.gml:6-10`](https://spelunky.ai/wiki/source/scripts/isCollisionLeft#L6-L10)

[^4]: [`objects/oOlmec/step.gml:104-111`](https://spelunky.ai/wiki/source/objects/oOlmec/step#L104-L111)

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

[^6]: Replay `fidelity/replays/ending-seed-1.txt`

[^7]: Replay `fidelity/replays/olmec-door-block-crush-seed-1.txt`

### Source code

- [`objects/oOlmec/step.gml`](https://spelunky.ai/wiki/source/objects/oOlmec/step)
- [`objects/oOlmec/create.gml`](https://spelunky.ai/wiki/source/objects/oOlmec/create)
- [`scripts/isCollisionLeft.gml`](https://spelunky.ai/wiki/source/scripts/isCollisionLeft)
