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.

# Double-speed Olmec and boulder

From the spelunky.ai wiki: <https://spelunky.ai/wiki/double-speed-olmec-and-boulder>. Verified against the spelunky.ai port [v0.1.13](https://github.com/851-labs/spelunky/releases/tag/v0.1.13) on 28 October 2026.

Double-speed Olmec and boulder is a quirk of Spelunky Classic in which Olmec and the idol's boulder are moved twice each step, so each covers twice its speed.

| Quirk     |                                                                                                                                                                                                                                     |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status    | GML + Oracle                                                                                                                                                                                                                        |
| Where     | [`scripts/gameStepEvent.gml:23-233`](https://spelunky.ai/wiki/source/scripts/gameStepEvent#L23-L233)                                                                                                                                |
| Pinned by | `fidelity/replays/enemy-olmec-crush-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 and the idol's boulder move twice their velocity each step.” |

[Olmec](https://spelunky.ai/wiki/olmec) and the [boulder](https://spelunky.ai/wiki/boulder) that the [golden idol](https://spelunky.ai/wiki/golden-idol) lets loose are moving blocks, which
the game moves by their speed every step. Their own code then moves them by that speed again, so each covers twice
the speed its code sets. Nothing on screen says so: it shows as an Olmec who flies faster than his numbers, and a
boulder that rolls at 8 to 10 pixels a step where its code says 4.5.

## What happens

Olmec hops toward a player standing still. He leaves the ground at 8 pixels a step, where his speed is 4, and
drifts left 4 pixels a step, where his speed is never more than 2. Over the player he stops, then slams down 10
pixels a step, where his speed is 5, and crushes him[^1].

**Clip: Olmec moves twice his speed.** Olmec hops toward a player standing still, rising 8 pixels a step where his code sets 4, and drifts left 4 pixels a step where it sets at most 2. Over the player, he stops and slams down 10 and then 12 pixels a step, where it sets 5 to 6, and crushes him. ([video](https://spelunky.ai/wiki/media/clips/quirks/olmec-double-speed/clip.mp4))

The player has taken the idol, and the tiki head drops the boulder onto him. Its speed is 4.5 pixels a step as it
rolls off, and once it's clear of him it moves 10, 8, 10 and 8 pixels a step[^2].

**Clip: The boulder rolls at twice its speed.** The player has taken the golden idol, and the tiki head drops a boulder that crushes him. It rolls off to the right at 8 and 10 pixels on alternate steps, twice the 4.5 its code sets, and slows as it rolls on toward the wall. ([video](https://spelunky.ai/wiki/media/clips/quirks/boulder-double-speed/clip.mp4))

## Why

Each step, the game first moves every moving block (`oMovingSolid`, which Olmec and the boulder are) by its speed,
pushing and carrying the player[^3]. Away from the player, that's the
plain move at the end:

```gml scripts/gameStepEvent.gml:215-219
  else
  {
    x+=xVelInteger
    y+=yVelInteger
  }
```

[`scripts/gameStepEvent.gml:215-219`](https://spelunky.ai/wiki/source/scripts/gameStepEvent#L215-L219), 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)).

Then each block's own step runs. Olmec's moves him by the same speed again, with `moveTo`, which stops at blocks:

```gml objects/oOlmec/step.gml:3-8
if (carryPlayer or collision_rectangle(x-1, y, x+66, y+62, oPlayer1, 0, 0))
{
    oPlayer1.x += xVel;
    oPlayer1.y += yVel;
}
moveTo(xVel,yVel);
```

[`objects/oOlmec/step.gml:3-8`](https://spelunky.ai/wiki/source/objects/oOlmec/step#L3-L8), 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 boulder's does the same[^4]. Both moves turn a fraction of a pixel into
whole pixels the same way, by the step's count[^5], so in the open the two
moves are the same and each covers twice its speed[^6]. The game's other moving blocks, such as
the [Ceiling Trap](https://spelunky.ai/wiki/ceiling-trap) and the [Smash Trap](https://spelunky.ai/wiki/smash-trap), either only set their speed and leave the moving
to the game, or move by variables of their own, so they move once.

## Reproducing it

It happens in every Olmec fight and to every boulder the idol sets off. In the first clip's replay, Olmec hops
toward the player on frame 2908: his y goes 496, 488, 480, 472 on 2909-2912, with his speed -4 and slowing; his x
goes 72, 68, 64, 60 on 2925-2928, with his sideways speed never past -2; and slamming, his y goes from 416 to 426 on 2954,
with his speed 5. Gaining a fifth of a pixel a step after that, his speed is turned into 5 or 6 whole pixels for each
of the two moves, so he falls 10 or 12 pixels a step. The slam crushes the player on 2964[^7]. In the second's, the boulder's speed is 4.5 from
frame 813, and its x goes 118, 128, 136, 146, 154 on 817-821[^8].

## 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[^6], and the oracle's fingerprints of the two replays pin the moves. No option turns it off.

## FAQ

### How fast does Olmec move in Spelunky Classic?

He leaves the ground at 8 pixels a step, drifts across at up to 4, and slams down at 10, gaining to 12. His code sets half of each, 4, 2 and 5 to 6, but he's moved by it twice a step.

### How fast does the golden idol's boulder roll?

It sets off at 8 and 10 pixels on alternate steps, about 270 pixels a second, and slows as it rolls. Its code sets 4.5 pixels a step, which it covers twice.

### Why do Olmec and the boulder move twice?

The game moves every moving block by its speed each step, before the blocks' own code runs, and Olmec's and the boulder's own code then moves them by the same speed again. The game's other moving blocks leave the moving to the game, so they move once.

### Does it make Olmec or the boulder harder?

It's how they've always played: the speeds players know are the doubled ones. Code that reads their speed, such as Olmec's check for a slam, sees half the speed they move at.

## See also

- **Related:** [Olmec](https://spelunky.ai/wiki/olmec), [Boulder](https://spelunky.ai/wiki/boulder), [Golden Idol](https://spelunky.ai/wiki/golden-idol)

## References

[^1]: Clip quirks/olmec-double-speed

[^2]: Clip quirks/boulder-double-speed

[^3]: [`scripts/gameStepEvent.gml:23-233`](https://spelunky.ai/wiki/source/scripts/gameStepEvent#L23-L233)

[^4]: [`objects/oBoulder/step.gml:7`](https://spelunky.ai/wiki/source/objects/oBoulder/step#L7)

[^5]: [`scripts/moveTo.gml:22-36`](https://spelunky.ai/wiki/source/scripts/moveTo#L22-L36)

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

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

[^8]: Replay `fidelity/replays/trap-boulder-crush.txt`

### Source code

- [`scripts/gameStepEvent.gml`](https://spelunky.ai/wiki/source/scripts/gameStepEvent)
- [`scripts/moveTo.gml`](https://spelunky.ai/wiki/source/scripts/moveTo)
- [`objects/oOlmec/step.gml`](https://spelunky.ai/wiki/source/objects/oOlmec/step)
- [`objects/oBoulder/step.gml`](https://spelunky.ai/wiki/source/objects/oBoulder/step)
