Star Fields
The arcade game Galaxian (and many others) cleverly employs a Linear Feedback Shift Register to generate a scrolling starfield. Essentially it runs the output of the LFSR directly into the raster giving a full screen of stars without using any memory. But the relative period of the LFSR and the size of the screen was such that the fixed pattern drifted given a nice scrolling stars effect.
I got to thinking this could be applied to the TRS-80. I was, in fact, quite wrong. But it did lead me to the idea of using a single pixel per scan-line as the basis for a star field.
The first version, stars.cas, just smooth-scrolled a star field.
A spiffier variant, starmap.cas lets the user move the star field with the arrow keys. And it has a few built-in patterns just to see what other odd effects might come out of the simple graphics kernel.
Finally, there's stardrft.cas that employs a little trickery of its very own to get the stars drifting all over the place. You can control the drift to some extent using the arrow keys.
All these only work on a TRS-80 Model III. Definitely possible on a Model I but I'd like a better solution to the synchronization problem.
Instructions
- stars.cas - Sit back and relax as the stars slide by.
- starmap.cas - Use the arrow keys to move the stars or make them dance in a fixed pattern with keys 1 through 5.
- stardrft.cas - The arrow keys can speed up the drift of some stars or effectively lock them into place. The effect ranges between cool to disenchanting.
George Phillips, July 5, 2009. george -at- 48k.ca