Blink wall: Difference between revisions
(Created page with "{{Element |zzt-oop name=Blink Wall |id={{Byte|29}} |char={{CharSwatch|206}} |category=Terrain |stats=yes |x-y step=Wall Direction |cycle=1 |p1=Starting time |p2=Period |p3=Timer |destructible=No |effect on movement=Wall |uses zzt-oop color=Yes }} A '''blink wall''' is a device that periodically emits blink wall rays, which can act as obstacles to the player, enemies, and objects. When emitting a blink wall ray, the game iterates over every tile in th...") |
(Ejection logic correction) |
||
| Line 35: | Line 35: | ||
== Player Ejection == | == Player Ejection == | ||
If the "restart on zap" flag for a board is set, then the player is sent back to the start of the board when they are hit. | If the "restart on zap" flag for a board is set, then the player is sent back to the start of the board when they are hit. Otherwise, the game attempts to eject the player. | ||
If the player is hit by a horizontal blink wall ray, the game | If the player is hit by a horizontal blink wall ray, the game first checks if the tile to the north is empty and ejects them there if so. Otherwise, the game checks if the tile to the south is empty and ejects them there if so. If neither tile is empty, the game instantly kills the player. | ||
If the player is hit by a vertical blink wall ray, | If the player is hit by a vertical blink wall ray, the game first checks if the tile to the east is empty and ejects them there if so. Otherwise, the game checks if the tile to the ''west'' is empty, and ejects them to the ''east'' if so. This bug allows the player to clip through solid walls. If neither the tile to the east or west is empty, the game instantly kills the player. | ||
{{ElementsNavbox}} | {{ElementsNavbox}} | ||
Latest revision as of 01:01, 23 December 2025
| Blink wall | |
|---|---|
| ZZT-OOP name | Blink Wall |
| Internal ID | 29 (0x1D) |
| Character | #char 206 ╬ (0xCE) |
| Category | Terrain |
| Stats | |
| X/Y-step | Wall Direction |
| Default cycle | 1 |
| P1 | Starting time |
| P2 | Period |
| P3 | Timer |
| Other traits | |
| Effect on movement | Wall |
| Destructible? | No |
| Uses ZZT-OOP color names? | Yes |
A blink wall is a device that periodically emits blink wall rays, which can act as obstacles to the player, enemies, and objects.
When emitting a blink wall ray, the game iterates over every tile in the direction it is facing placing rays until it runs into a tile that is non-empty and non-destructible (breakable walls are non-destructible for this purpose). If the blink wall hits a player, the game tries to eject the player, and stops if it cannot do so.
When deleting a blink wall ray, the game deletes every tile in the direction of the blink wall until it runs into a tile that is not the corresponding type of blink wall ray and is not the same color as the blink wall itself.
Blink walls support non-standard x/y-step values, If the x-step of a blink wall is 0, then it emits vertical blink wall rays. Otherwise, it emits horizontal blink wall rays.
Because blink walls use their x and y steps as parameters and act every tick by default, they are especially vulnerable to the "diemove" bug.
Timing Details
Blink walls run at cycle 1 by default. On their first cycle, the game sets their internal timer (P3) to the value of P1 + 1. This internal timer decreases every tick until it reaches 1.
When the internal timer (P3) reaches 1, the blink wall spends a cycle either emitting or erasing a blink wall ray, and then sets the internal timer to the value of (P2 * 2) + 1.
A blink wall determines whether it should emit or erase a blink wall ray based on whether the first tile in front of it is a ray of the proper element type and color. Due to this fact, it is possible under particular circumstances for them to become desynchronized by half a cycle (e.g. because of a bomb explosion).
Player Ejection
If the "restart on zap" flag for a board is set, then the player is sent back to the start of the board when they are hit. Otherwise, the game attempts to eject the player.
If the player is hit by a horizontal blink wall ray, the game first checks if the tile to the north is empty and ejects them there if so. Otherwise, the game checks if the tile to the south is empty and ejects them there if so. If neither tile is empty, the game instantly kills the player.
If the player is hit by a vertical blink wall ray, the game first checks if the tile to the east is empty and ejects them there if so. Otherwise, the game checks if the tile to the west is empty, and ejects them to the east if so. This bug allows the player to clip through solid walls. If neither the tile to the east or west is empty, the game instantly kills the player.
| Elements | |
|---|---|
| Special | |
| Items | |
| Terrain | |
| Creatures | |
| Text | |