Twinkling Stars: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Code is now in a block rather than bullet points.) |
||
| Line 1: | Line 1: | ||
This code allows for the illusion of twinkling stars. | This code allows for the illusion of twinkling stars. | ||
You can make a number of stars with various numbers of /i's after #char 32, with at least 3 lines different from each other, to better simulate an entire field of twinkling stars. | You can make a number of stars with various numbers of /i's after #char 32, with at least 3 lines different from each other, to better simulate an entire field of twinkling stars. | ||
The 'animation' can be slowed down by setting the #cycle to 2 or 3, or by adding additional /i lines between the different #char commands. | The 'animation' can be slowed down by setting the #cycle to 2 or 3, or by adding additional /i lines between the different #char commands. | ||
#cycle 1 | |||
:twinkle | |||
/i | |||
/i | |||
#char 250 | |||
/i | |||
#char 43 | |||
/i | |||
#char 88 | |||
/i | |||
#char 197 | |||
/i | |||
#char 88 | |||
/i | |||
#char 43 | |||
/i | |||
#char 250 | |||
/i | |||
#char 32 | |||
/i | |||
/i | |||
/i | |||
#twinkle | |||
'''Caution''': Overuse of objects with the #cycle 1 command can cause ZZT to experience slowdown, even if the game is emulated on a fast computer. | |||
[[Category: Examples]] | [[Category: Examples]] | ||
Latest revision as of 23:12, 23 December 2025
This code allows for the illusion of twinkling stars.
You can make a number of stars with various numbers of /i's after #char 32, with at least 3 lines different from each other, to better simulate an entire field of twinkling stars.
The 'animation' can be slowed down by setting the #cycle to 2 or 3, or by adding additional /i lines between the different #char commands.
#cycle 1 :twinkle /i /i #char 250 /i #char 43 /i #char 88 /i #char 197 /i #char 88 /i #char 43 /i #char 250 /i #char 32 /i /i /i #twinkle
Caution: Overuse of objects with the #cycle 1 command can cause ZZT to experience slowdown, even if the game is emulated on a fast computer.