Whoa, there are still almost two weeks left in the month and I have Octobers program done and waiting for you. Yep, you heard right. This month is a short one called NA. The program is an action game that requires you to use N and A to try to stop a runner. The letters have significance as you use them to stop the runner. However, there is a twist, miss and the program changes the letter needed. Sounds easy right? Guess what, I still havent beaten it. Can you?
Weighing in at only 14 lines, the original program could probably run in 1K with some tweaks. I added some extra lines to make sure it runs forever. That caused it to jump up to 1.5K. That is with a full screen though. Since the ZX81 will shrink the display size as memory runs low, it might just still fit. Maybe.
The program itself is surprisingly fast, perhaps too much so. I wrapped the program in two loops that act as the timing and movement managers. A simple print statement moves the runner with some interesting graphical results. I managed the game state using basically four lines that deal with any changes in the game state. One grabs the key pressed. Two lines compare and branch to the next test. The last line resets the string holding the required keys. Looking over the code, Im surprised how efficient and effective the code is. Nothing fancy, just a short game that works.
Na na na na, na na na na, hey hey hey, goodbye! Sorry, I couldnt resist!