SpelunkyFan wiki

Olmec sitting in the lava

Verified against the spelunky.ai port v0.1.11 on .

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.

Olmec can only die in lava, when his slams have dug him down through the floor of his lair into it (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].

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.

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:

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, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).

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]:

if (isCollisionLeft(1))
{
    x += 1;
    xVel = 0;
    //if (xVel < 0) xVel = -xVel * 0.8;
}
objects/oOlmec/step.gml:22-27, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).

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 by the left wall of his 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

#

References

#
  1. Clip quirks/olmec-lava-left-wall
  2. objects/oOlmec/create.gml:3
  3. scripts/isCollisionLeft.gml:6-10
  4. objects/oOlmec/step.gml:104-111
  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

#