SpelunkyFan wiki

Jetpacks vanishing while the player is invisible

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

Jetpacks vanishing while the player is invisible is a quirk of Spelunky Classic in which a Jetpack lying in the level vanishes once the player turns invisible.

A Jetpack lying on the floor, in a shop or in the player's hands is gone the moment he turns invisible, which only happens as he dies. Nobody sees it go: without the Ankh the game-over screen follows, and with it, he's visible again before any Jetpack looks.

What happens

#

The player walks past a Jetpack lying on the floor into a Mantrap, which swallows him. On the next step the Jetpack behind him is gone [1].

A jetpack on the floor vanishes when the player dies unseen. The player walks past a jetpack lying on the floor into a man trap, which swallows him. On the next step the jetpack behind him is gone: it destroys itself while the player is invisible.

Why

#

The Jetpack's step has one check of its own:

if (instance_exists(oPlayer1))
    if (not oPlayer1.visible) instance_destroy();
objects/oJetpack/step.gml:3-4, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).

It's the worn Cape's check, word for word [2]. The Cape is drawn on the player's back, so it should go when he does. A worn Jetpack isn't an object at all, only a flag (global.hasJetpack), so the oJetpack that runs the check is the pickup: the one lying in the level, for sale, or held.

The player turns invisible when he's crushed, when his hearts fall below -99 [3], or when a Mantrap or the Ghost takes him [4] [5]. After a crush or the hearts, every Jetpack goes in the same step, as the player steps first; after a Mantrap or the Ghost, in the next, as their collisions come after the steps. With the Ankh it never happens: the revival makes him visible again before any Jetpack's step runs [6].

Reproducing it

#

Die out of sight with a Jetpack nearby, without the Ankh: walk into a Mantrap or let the Ghost take the player. The game-over screen hides it, so it only shows in the step between. The replay of the clip's staged scene, on a custom level, has a Mantrap eat the player and the Jetpack on the floor behind him destroyed on the next step [7]. The Ankh's case is only the code's and the event order's: no replay has a Jetpack near an Ankh revival.

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 fingerprint of the replay pins the step it goes. No option turns it off.

FAQ

#
Why did the Jetpack disappear in Spelunky Classic?

The player died out of sight: a Mantrap or the Ghost took him, he was crushed, or his hearts fell below -99. Any Jetpack lying in the level, for sale or in his hands destroys itself while he's invisible.

Can a Jetpack vanish while the player is alive?

No. With the Ankh, the revival makes him visible again before any Jetpack checks, so the Jetpacks stay. Without it he's dead, and they're gone behind the game-over screen.

Why does the Jetpack do this?

Its code is the worn Cape's, which removes the Cape drawn on the player's back when he's gone. On the Jetpack, it's the pickup lying in the level that runs it.

See also

#

References

#
  1. Clip quirks/jetpack-vanishes-player-invisible
  2. objects/oCape/step.gml:49-50
  3. objects/oPlayer1/step.gml:1484-1488
  4. objects/oManTrap/collision_oCharacter.gml:41-44
  5. objects/oGhost/collision_oCharacter.gml:13-16
  6. Quirk 1 (docs/quirks.md)
  7. Replay fidelity/replays/item-jetpack-player-invisible.txt

Source code

#