Passage: Difference between revisions
(Initial version) |
(Colors, multiple passages on one board, re-enter when zapped behavior) |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Element | {{Element | ||
|id= | |id={{Byte|11}} | ||
|zzt-oop name=passage | |zzt-oop name=passage | ||
|category=item | |category=item | ||
|char=0xF0 | |char={{CharSwatch|0xF0}} | ||
|stats=yes | |stats=yes | ||
|cycle=0 | |cycle=0 | ||
Line 10: | Line 10: | ||
|effect on movement=wall; blocks movement of most entities but causes the player to teleport on touch | |effect on movement=wall; blocks movement of most entities but causes the player to teleport on touch | ||
|uses zzt-oop color=yes, but named color affects background only; foreground is always white | |uses zzt-oop color=yes, but named color affects background only; foreground is always white | ||
|visible in dark=yes | |||
}} | }} | ||
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 [[edge|edges]]. | |||
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 [[edge|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. | 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. | ||
Line 18: | Line 18: | ||
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. | 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 == | By default, placing a passage in the editor or through [[ZZT-OOP]] with the default colors creates a passage with a white foreground and a dark background color corresponding to the requested color, as shown below: | ||
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 | {| class="wikitable" | ||
|+ Default passage color chart | |||
|- | |||
! ZZT-OOP name !! Element color | |||
|- | |||
| Blue || {{ColorSwatch|fg=white|bg=dark blue}} | |||
|- | |||
| Green || {{ColorSwatch|fg=white|bg=dark green}} | |||
|- | |||
| Cyan || {{ColorSwatch|fg=white|bg=dark cyan}} | |||
|- | |||
| Red || {{ColorSwatch|fg=white|bg=dark red}} | |||
|- | |||
| Purple || {{ColorSwatch|fg=white|bg=dark purple}} | |||
|- | |||
| Yellow || {{ColorSwatch|fg=white|bg=brown}} | |||
|- | |||
| White || {{ColorSwatch|fg=white|bg=light grey}} | |||
|} | |||
However, the passage's functionality is not limited to these colors, because the engine takes both foreground and background colors into consideration when determining the player's position. Namely, it will only put the player on top of any passage with the same foreground ''and'' background color as the one they used. Thus, working passages can be made with any of the 256 possible color combinations that can be placed with an external editor. | |||
In addition, if a passage directs the player to a board that has multiple passages of the same color, it will put the player on the passage furthest to the east regardless of the passage's Y position. This even applies if the destination is the same board they entered from, so a designer can make a one-way teleporter in this fashion. | |||
As with the board edge, entering a "Re-enter when zapped" board through a passage will change the position the player will be reset to when hurt to where they entered the board, in this case on top of the passage. | |||
==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. | 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. | ||
[[Category:Elements]] | |||
{{ElementsNavbox}} |
Latest revision as of 03:50, 14 February 2021
Passage | |
---|---|
ZZT-OOP name | passage |
Internal ID | 11 (0x0B) |
Character | #char 240 ≡ (0xF0) |
Category | item |
Stats | |
Default cycle | 0 |
P3 | index of destination board (title screen is 0) |
Other traits | |
Effect on movement | wall; 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 |
Visible in the dark? | yes |
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.
By default, placing a passage in the editor or through ZZT-OOP with the default colors creates a passage with a white foreground and a dark background color corresponding to the requested color, as shown below:
ZZT-OOP name | Element color |
---|---|
Blue | white on dark blue (0x1F) |
Green | white on dark green (0x2F) |
Cyan | white on dark cyan (0x3F) |
Red | white on dark red (0x4F) |
Purple | white on dark purple (0x5F) |
Yellow | white on dark brown (0x6F) |
White | white on light gray (0x7F) |
However, the passage's functionality is not limited to these colors, because the engine takes both foreground and background colors into consideration when determining the player's position. Namely, it will only put the player on top of any passage with the same foreground and background color as the one they used. Thus, working passages can be made with any of the 256 possible color combinations that can be placed with an external editor.
In addition, if a passage directs the player to a board that has multiple passages of the same color, it will put the player on the passage furthest to the east regardless of the passage's Y position. This even applies if the destination is the same board they entered from, so a designer can make a one-way teleporter in this fashion.
As with the board edge, entering a "Re-enter when zapped" board through a passage will change the position the player will be reset to when hurt to where they entered the board, in this case on top of the passage.
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.
Elements | |
---|---|
Special | |
Items | |
Terrain | |
Creatures | |
Text |