Check out my ZX81 rendition of the US Flag

A patriotic July and Summer heat are always a great time to program.

Although July nears its end, patriotism remains. From the frantic happiness of the 4th, to general love of country, July is about fireworks and Summer heat. Digging into my archives, I found a US Flag to commemorate the month.

Interesting but boring.
The flag is, well, a flag. The program generates a pretty close replica using the ZX81’s simple graphics. As a typical teenager will do, I stated the obvious by adding a title and signature line.

USA Flag, 1984,2019

The image fills the screen and is quite interesting to watch being generated. Sadly, it doesn’t take long—the one time the ZX81 is fast at something. My only regret is the font isn’t well designed. Those fat L’s and I’s look ugly. I did better in other programs, so it is disappointing here.

Adding a little flare.
Since the graphics are static once generated, the program is a bit dull. I run it again, but it doesn't add much. To spice it up, I decided to add a little flare. Looking at the signature, I thought about those cheesy starbursts I used to see in old computer programs. Perfect!

After a few minutes of work, I had a nice flashy animation. Of course, one is never enough. To keep the animation interesting, I chose a one of three random location for the star. A little delay keeps it from being repetitive.

Simple is sometimes best.
As with most of my short animations, the program is short and to the point. The flag is built using a few loops. The signature is simple graphics printed on the screen. This ended the original code.

The newer animation is almost as long as the original program. To condense the code, I set the location of the starburst using some variables. The animation itself is a series of PRINT statements delayed with some slow math. Something I’ve demonstrated many times.

And with that, I hope everyone is having a great Summer, no matter what country you are in.

Comments on this article:

No comments so far.

Write a comment:

Type The Letters You See.
[captcha image][captcha image][captcha image][captcha image][captcha image][captcha image]
not case sensitive