Messages halved on lit levels
Verified against the spelunky.ai port v0.1.13 on .
Messages halved on lit levels is a quirk of Spelunky Classic in which a message lasts half as long on a lit level as on a dark one.
Messages like "I HEAR SNAKES... I HATE SNAKES!" or "A COMPASS FOR $5400." appear at the bottom of the screen for a set number of steps, 200 for a special level's. That's how long they last on a dark level. On every other level, they last half as long, as two pieces of code each take a step off the timer, so a special level's message is gone in about three seconds.
What happens
#Level 4 of the Mines is a snake pit, and lit. Its message, "I HEAR SNAKES... I HATE SNAKES!", is gone after 100 steps [1].
On level 2, which is dark, the dark level's message lasts the full 200 [2].
Why
#oScreen draws the message on every level while the game isn't paused, and takes a step off its timer as it does
[3] [4]. The
level's own drawing, in oLevel, draws the same message again, and takes another step off, but only on a lit
level:
if (not global.darkLevel and global.messageTimer > 0)
{
draw_set_font(global.myFontSmall);
draw_set_color(c_white);
strLen = string_length(global.message)*8;
n = 320 - strLen;
n = ceil(n / 2);
draw_text(view_xview[0]+n, view_yview[0]+216, string(global.message));
if (not isLevel("rTutorial")) draw_set_color(c_yellow);
strLen = string_length(global.message2)*8;
n = 320 - strLen;
n = ceil(n / 2);
draw_text(view_xview[0]+n, view_yview[0]+224, string(global.message2));
global.messageTimer -= 1;
}objects/oLevel/draw.gml:11-27, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).So on a lit level the timer goes down by 2 a step, and a message set to 200 lasts 100 steps [5]. Every message sets the same timer, to 200 for a special level's or the Ghost's warning, 120 for an item picked up [6], and less for others, and every one lasts half its time on a lit level. A tutorial sign's is set to 200 again on every step the player touches the sign, so it only starts counting down once he leaves it [7]. A special level's second message comes 209 steps after the first [8], which leaves a gap of about 109 steps with no message on a lit level, and 9 on a dark one.
Reproducing it
#Every message on a lit level shows it. The replay of the clips plays the Mines' first four levels: level 2 is dark, and its message, set to 200 on frame 1730, lasts until 1930; level 4 is a lit snake pit, and its message, set on 3651, is gone on 3751 [9]. A lit graveyard's message lasts 100 steps the same way [10], and a dark one's three messages 200 steps each [11].
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 both timers. No option turns it off.
FAQ
#- How long do messages last in Spelunky Classic?
Each message sets how long it lasts: 200 steps, about 6.7 seconds, for a special level's, 120 for an item picked up, 80 for a Shopkeeper's lines. That's how long it lasts on a dark level. On a lit level, which is most of them, it's gone in half the time: a special level's after 100 steps, about 3.3 seconds.
- Why do messages disappear so fast in Spelunky Classic?
On a lit level, the message's timer is counted down twice a step: once by the code that draws the screen and again by the level's own drawing, which only draws the message when the level isn't dark.
- Does it change the time between a special level's two messages?
Yes. A level with two messages shows the second about 209 steps after the first. On a lit one, such as a City of Gold that's a sacrifice pit, the first is gone 109 steps before the second comes; on a dark one, such as a dark graveyard, only 9.
See also
#References
#- Clip quirks/lit-message-halved
- Clip dark-level/arrival
objects/oScreen/step_begin.gml:148objects/oScreen/step_begin.gml:243-259- Quirk 1 (docs/quirks.md)
scripts/scrStealItem.gml:33objects/oMsgSign/collision_oCharacter.gml:1-3objects/oPlayer1/alarm_0.gml:5-13- Replay
fidelity/replays/mines-seed-2.txt - Replay
fidelity/replays/jungle-seed-10.txt - Replay
fidelity/replays/jungle-seed-10-dark-graveyard-lake.txt