Jungle earth in the City of Gold
Verified against the spelunky.ai port v0.1.12 on .
This page describes a secret.
Jungle earth in the City of Gold is a quirk of Spelunky Classic in which the odd block of the City of Gold is the Jungle's earth rather than gold.
The City of Gold is a Temple level made of gold: its temple stone, its stone blocks and its push blocks all turn gold there. But the Temple's room script also makes the odd block of the Jungle's earth, and the earth has no check for the City, so the City of Gold has a few blocks of plain green and brown earth among its gold.
What happens
#The City of Gold loads with the player near its entrance. He walks right along its gold floor and over a block of the Jungle's mossy earth set in it [1].
Why
#The Temple's room script, which builds the City too, makes the Jungle's earth (oLush) for one of its
always-solid tiles in a hundred, before it rolls a stone block or temple stone:
if (tile == "1" and not collision_point(xpos, ypos, oSolid, 0, 0))
{
if (rand(1,100) == 1) instance_create(xpos, ypos, oLush);
else if (rand(1,10) == 1) instance_create(xpos, ypos, oBlock);
else instance_create(xpos, ypos, oTemple);
}scripts/scrRoomGen4.gml:317-322, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).Its side room with two trees, which the City rolls among its side rooms, stands on a row of eight more [2] [3] [4]. Temple stone turns gold in the City
(if (global.cityOfGold) sprite_index = sGTemple;) [5], and so do the
stone and push blocks, but the earth's create event has no such line: it rolls a gold vein, a gem or an item as
the Jungle's earth does [6]. Broken, it gives rubble, and gold only from a
vein [7] [8]. It's harmless.
Reproducing it
#Reach the City of Gold and look for green blocks among the gold; most Cities have some. The replay of the City with seed 9 loads it on frame 6745 with six earth blocks, one at (560, 96), near the entrance [9]. The clip, cut from the run on to Olmec, walks over that one [10]. Reaching the City of Gold has the way there.
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 [8], and the oracle's fingerprint of the replay pins the earth blocks. No option turns it off.
FAQ
#- Why is there a green block in the City of Gold?
It's a block of the Jungle's earth. The Temple's levels make one now and then, and the City of Gold is built as a Temple level. Its other blocks turn gold in the City, but the earth block has no such check, so it stays green and brown.
- Does the earth block in the City of Gold give gold?
Only if it holds a gold vein, as the Jungle's earth sometimes does. Otherwise it breaks into rubble, where the City's gold blocks give gold chunks and a nugget.
- How common is the earth in the City of Gold?
One in a hundred of the layouts' always-solid tiles, plus a row of eight under the side room with two trees, which the City rolls too. Most Cities have some: the one in the clip has six.
See also
#References
#- Clip quirks/city-jungle-earth
scripts/scrRoomGen4.gml:70-74scripts/scrRoomGen4.gml:104-107scripts/scrRoomGen4.gml:505-508objects/oTemple/create.gml:7objects/oLush/create.gml:5-15objects/oLush/destroy.gml:3-33- Quirk 1 (docs/quirks.md)
- Replay
fidelity/replays/city-of-gold-seed-9.txt - Replay
fidelity/replays/city-of-gold-seed-9-to-olmec.txt