Remarks: One-Liners
From Maze
(Difference between revisions)
(Merge & revision of two earlier sections) | |||
| Line 32: | Line 32: | ||
In Icicle Storm, the unpredictable nature of the random number generator emulated the natural physical process of precipitation. This random nature can be combined with another hardware feature of the Commodore 64, the VIC-II chip. Together they create the following example which exploits the video chip inside the Commodore 64: | In Icicle Storm, the unpredictable nature of the random number generator emulated the natural physical process of precipitation. This random nature can be combined with another hardware feature of the Commodore 64, the VIC-II chip. Together they create the following example which exploits the video chip inside the Commodore 64: | ||
| − | <code>10 poke 53248+22,int(192+4+3*sin((time*3.456+rnd(1)*.5))): goto 10<code> | + | <code>10 poke 53248+22,int(192+4+3*sin((time*3.456+rnd(1)*.5))): goto 10</code> |
The effect is to cause the main portion of the screen to slightly contract and the border to expand horizontally; everything that appears on the screen then shakes from left to right. This is a good example of one-liner program which exists not only to express a thought about weather, but also demonstrates the simplicity of working with the side-scrolling register in the video chip, an advanced topic which is never taught explicitly in the Commodore 64 manuals. | The effect is to cause the main portion of the screen to slightly contract and the border to expand horizontally; everything that appears on the screen then shakes from left to right. This is a good example of one-liner program which exists not only to express a thought about weather, but also demonstrates the simplicity of working with the side-scrolling register in the video chip, an advanced topic which is never taught explicitly in the Commodore 64 manuals. | ||
