SpelunkyFan wiki

The Tunnel Man skips his first visit

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

The Tunnel Man skips his first visit is a quirk of Spelunky Classic in which he isn't in his screen the first time it's reached.

The Tunnel Man digs the shortcuts, and waits for the player's money in the screen at the end of an area: after level 4 for the first. On a fresh install, the first player to get there finds the screen empty. Each shortcut is owed $1 more than its price at first, and the screen only takes that $1 off instead of showing him.

What happens

#

On a fresh install, the player takes the exit of level 4, the last of the Mines. The screen between levels tallies the loot, and nobody is there; X skips it, and the Jungle's first level loads [1].

Replays it in the game, where you can take over.Replays it in the game, to pause and scrub.
The Tunnel Man misses his first visit. On a fresh install, the player leaves the Mines' last level. The transition to the Jungle shows the tally and no Tunnel Man, though no shortcut has been paid for yet; he only comes on the next visit.

Why

#

What's owed on the shortcuts is kept in the high scores table, and a fresh table stores the first two $1 above their prices [2]. Paying off the level 9 shortcut does the same to the level 13 one [3]. The screen between levels makes the Tunnel Man only if what's owed is down to the price, and otherwise takes 1 off it:

if (global.tunnel1 > 0 and global.tunnel2 > 0 and isRoom("rTransition1x"))
{
    if (global.tunnel1 > global.tunnel1Max) global.tunnel1 -= 1;
    else instance_create(96+8, 176+8, oTunnelMan);
}
objects/oTransition/create.gml:47-51, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).

So the first visit to each of his three screens takes the $1 off and shows no one, and he first shows up on the next [4] [5]. What's owed goes back into the table when the game ends in a death or a win [6].

Reproducing it

#

Start with a fresh high scores table (a new install) and reach the end of the Mines. It happens to every new player, once for each shortcut. The replay of the clip starts from a fresh table: the screen after level 4 loads on frame 4231, takes what the level 5 shortcut is owed from $100,001 to $100,000, and makes no Tunnel Man; level 5 loads on 4264 [7]. The screen after level 8 does the same for the level 9 shortcut [8], and the screen after level 12 for the level 13 one, once the level 9 one is paid off [9].

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 the replays pin each empty screen. No option turns it off.

FAQ

#
Why isn't the Tunnel Man after level 4 in Spelunky Classic?

The first time a game reaches the screen after level 4, he isn't there: the game only takes $1 off what the level 5 shortcut is owed. He's there from the next game on, once this one has ended in a death or a win.

Does the Tunnel Man skip his first visit for every shortcut?

Yes. The level 5 and level 9 shortcuts each start $1 above their price, and paying off the level 9 one sets the level 13 one $1 above its price too, so each of his three screens is empty the first time.

Is the missed visit lost for good?

No, as long as the game ends in a death or a win, which saves what's owed in the high scores table. Then the next time the player reaches that screen, the Tunnel Man is there and asks for the full price. Quitting the game before that loses the $1, and the screen is empty again next time.

See also

#

References

#
  1. Clip quirks/tunnel-man-first-visit
  2. scripts/scrResetHighscores.gml:32-33
  3. objects/oTunnelMan/step.gml:24
  4. objects/oTransition/create.gml:52-60
  5. Quirk 1 (docs/quirks.md)
  6. scripts/scrUpdateHighscores.gml:97-99
  7. Replay fidelity/replays/tunnelman-seed-2-mines-over-max.txt
  8. Replay fidelity/replays/tunnelman-seed-9-jungle-over-max.txt
  9. Replay fidelity/replays/tunnelman-seed-9-jungle-paid-ice-over-max.txt

Source code

#