SpelunkyFan wiki

The Pitcher's Mitt's one-step gravity

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

The Pitcher's Mitt's one-step gravity is a quirk of Spelunky Classic in which the Mitt's light gravity lasts one step, but for good on a Jar, a Skull or a die.

The Pitcher's Mitt throws harder and lighter: 6 pixels a step faster, with a sixth of the usual gravity. Most items forget the lighter gravity a step later. A Jar, a Skull or a die never does, and floats for the rest of its life. An arrow's own light gravity goes the same way as most items' Mitt gravity.

What happens

#

Wearing a Pitcher's Mitt, the player throws a Rock straight ahead: it drops to the floor within a few steps and stops short. He throws a Jar the same way: it keeps the Mitt's light gravity and flies flat across the room [1].

The Pitcher's Mitt's light gravity lasts one step for a rock. Wearing a pitcher's mitt, the player throws a rock straight ahead: it drops to the floor within a few steps and stops short. He throws a jar the same way: it keeps the mitt's light gravity and flies flat across the room.

Why

#

A throw from the hands with the Mitt, not crouching, speeds the item up and sets its gravity, myGrav, to 0.1:

            if (global.hasMitt and not scrPlayerIsDucking())
            {
                if (holdItem.xVel < 0) holdItem.xVel -= 6;
                else holdItem.xVel += 6;
            
                if (not kUp and not kDown) holdItem.yVel = -0.4;
                else if (kDown) holdItem.yVel = 6;
                
                holdItem.myGrav = 0.1;
            }
scripts/scrUseItem.gml:667-676, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).

But the step most items run (oItem's) sets myGrav back to 0.6 on every step the item isn't in lava, after that step's gravity is added:

        if (collision_rectangle(x-3, y-3, x+3, y+3, oLava, 0, 0))
        {
            myGrav = 0;
            xVel = 0;
            yVel = 0;
            y += 0.05;
        }
        else
        {
            myGrav = 0.6;
        }
objects/oItem/step.gml:160-170, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).

So a Rock falls at 0.1 for one step and at 0.6 from the next. A Jar, a Skull and a die run steps of their own instead, which set myGrav only in lava, and they keep the 0.1 for good [2] [3] [4] [5]. Monsters and the Damsel set their gravity on every step too, and lose it within a step [6] [7] [8] [9]. An arrow is made with a gravity of 0.2 [10], but its step runs oItem's first [11], so every arrow, a Bow's or an Arrow Trap's, falls at 0.2 for one step and at 0.6 after [12].

Reproducing it

#

Wear the Mitt and throw anything level from the ground: a Rock lands sooner than it would without it. Throw a Jar or a Skull the same way to see it float, or a die in the Dice House. The replay of the clip's staged scene, on a custom level, throws a Rock that falls at 0.1 for one step and 0.6 from the next, and is on the floor 4 steps after it leaves the hands; then a Jar, which still has 0.1 after it lands [13].

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 [12], and the oracle's fingerprint of the replay pins both items' falls. No option turns it off.

FAQ

#
Does the Pitcher's Mitt make things fly farther in Spelunky Classic?

Faster, not farther, for most items. The Pitcher's Mitt adds 6 pixels a step to a throw and sets its gravity to a sixth, but the lighter gravity lasts one step, so a Rock thrown level from the ground is on the floor within 4 steps, and stops nearer than one thrown without it.

Why does a Jar thrown with the Mitt float?

A Jar, a Skull and a die have movement code of their own, which only sets their gravity in lava. They keep the Mitt's light gravity for good: a Jar thrown level flies flat across a room, and falls slowly ever after.

Do arrows fall slowly?

Only for their first step. An arrow is made with a third of the usual gravity, but runs the code that puts it back, so after one step it falls as fast as a thrown Rock.

See also

#

References

#
  1. Clip quirks/mitt-gravity-one-step
  2. objects/oJar/step.gml:27-30
  3. objects/oJar/step.gml:81-86
  4. objects/oSkull/step.gml:79-84
  5. objects/oDice/step.gml:94-99
  6. objects/oEnemy/step.gml:42
  7. objects/oEnemy/step.gml:54
  8. objects/oDamsel/step.gml:42
  9. objects/oDamsel/step.gml:47
  10. objects/oArrow/create.gml:6
  11. objects/oArrow/step.gml:1
  12. Quirk 1 (docs/quirks.md)
  13. Replay fidelity/replays/item-mitt-gravity-one-step.txt

Source code

#