Passage

From Wiki of ZZT
Revision as of 06:15, 18 January 2021 by Quantum (talk | contribs) (Add navbox)
Jump to navigation Jump to search
Passage
ZZT-OOP namepassage
Internal ID0x0B
Character#char 240 (0xF0)
Categoryitem
Stats
Default cycle0
P3index of destination board (title screen is 0)
Other traits
Effect on movementwall; blocks movement of most entities but causes the player to teleport on touch
Destructible?no
Uses ZZT-OOP color names?yes, but named color affects background only; foreground is always white

The passage element allows the player to switch the active board. They are one of the two ways to switch boards, the other being board edges.

By default, traveling via passage does not modify the destination board. However, if the destination contains a second passage with the same color, ZZT will reposition the player on top of that second passage, so that the two passage tiles appear to be two ends of the same passageway: the player steps in one and out the other.

Traveling through a passage will pause the game immediately after switching boards. This allows the player to examine the new board before play begins, so as not to be caught too off guard. However, this can lead to soft-locks if a passage is blocked off: a player can still enter a blocked passageway, but they won't be able to do anything, including returning to the previous board.

Tile repositioning bug

Players traveling between identically-colored passages can disturb the surrounding tiles. Specifically, when ZZT repositions the player on top of the destination board's passage, it does so without updating the player stat's under type/color. In other words, ZZT relocates not just the player, but also the tile the player was previously standing on, leaving an empty in its place.

This bug mainly matters for passages adjacent to fake walls or to other passages, as these tiles can be overwritten when the player is repositioned. The bug can be avoided by making sure that passages are only surrounded by walls and empties, and by making sure that the player is placed on top of an empty tile when the board is created.