SpelunkyFan wiki

Stomping while jumping

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

Stomping while jumping is a quirk of Spelunky Classic in which jumping up into a monster from just below kills it as a stomp would.

A stomp is meant to be a landing on a monster's head. But the touch code most monsters share doesn't ask whether the player is coming down: jumping counts as well as falling, as long as he's higher than the monster's middle. So jumping up into a monster from just below kills it as a stomp, and he bounces off it.

What happens

#

The player jumps up into a flying Bat from just below it and kills it, and bounces higher [1].

Bat killed from below. The player jumps up into a flying bat and kills it: the game counts touching an enemy while jumping as a stomp, from below too.

Why

#

When a monster that inherits oEnemy's touch code touches the player within 12 pixels of its middle across, the first test is the stomp's. It accepts the player's JUMPING state (15) as well as FALLING (16), and only asks that his y be above the monster's y+8:

else if (not other.dead and (other.state == 15 or other.state == 16) and other.y < y+8 and not other.swimming)
{
    other.yVel = -6 - 0.2 * other.yVel;
    if (global.hasSpikeShoes) { hp -= (3 * (floor(other.fallTimer/16)+1)); scrCreateBlood(other.x, other.y+8, 1); }
    else hp -= (1 * (floor(other.fallTimer/16)+1));
    other.fallTimer = 0;
    playSound(global.sndHit);
objects/oEnemy/collision_oCharacter.gml:6-12, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).

A player rising into a monster from just below is jumping, so it's a stomp: the monster loses a hit point (three with Spike Shoes), and the player is bounced up, yVel -6 less a fifth of what it was (after his own step's gravity, which comes first). A Bat has 1 hit point, and its step kills it once they're gone [2] [3].

Reproducing it

#

Jump up into a Bat, or a Spider dropping from the ceiling, from just below, so that the player's middle is above the monster's when they touch. It happens in normal play. The replay of the clip jumps on frame 1073 and, still rising, hits a Bat: on 1076 the stomp's bounce, after his step's gravity, takes the player's yVel from -3.4 to -5.4, and the Bat dies on 1077 [4].

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 [3], and the oracle's fingerprint of the replay pins the jump, the bounce and the kill. No option turns it off.

FAQ

#
Can you stomp a Bat by jumping into it in Spelunky Classic?

Yes. A stomp only needs the player to be jumping or falling with his middle above the monster's, so jumping up into a Bat from just below kills it, and he bounces as if he'd landed on it.

Which monsters can be stomped from below?

Nearly all. The touch code most monsters share, the Bat's and a dropping Spider's among them, takes a jumping player, and so do most of the monsters' own, the Caveman's and the Hawkman's included, some only closer to the monster's top. A Yeti, the Yeti King or a Shopkeeper stomped on the way up takes no hit points from it, but is stunned (Stomps that take nothing on the way up).

Does jumping into a monster from below hurt the player?

Not when it counts as a stomp. The touch code tests for a stomp before it tests for hurting him, so a player who's higher than the monster's middle takes nothing, and bounces off it.

See also

#

References

#
  1. Clip bat/jump-kill
  2. objects/oBat/step.gml:8
  3. Quirk 1 (docs/quirks.md)
  4. Replay fidelity/replays/enemy-mines-seed-1-kills.txt

Source code

#