February is upon us and that means another program of the month. This month it is another one from 1983: Light Walls. In case you hadn't guessed, it has its roots in Tron. The game requires you to steer right (".") or left ("z") to avoid hitting the light walls. I wrote this program while a friend was over and we took turns trying beat others high scores. Who says you need color and 3D graphics to have a good time! Not convinced. Give it a try yourself and see how good your reactions are.
This game works well given its simple mechanics. Although it is called light walls, the wall is actually just a black box. To keep it fast, it just prints the direction to go and then waits a bit. If you turn the right direction, your score increases. If you hesitate or hit the wrong key, into the wall you go. No cool special effects, just some words telling you how you are doing. Simple, yet fast and effective.
If you look through the listing, you'll find it similar to my other programs. Beyond the obviously spelling errors, I must have added the straight away later. Oddly, I used two IF statements to check if the correct key was pressed on the left turn. But on the right and straight away, I used a single IF. Not sure if I hadn't thought to use a Boolean expression on the first check or if I was optimizing as I coded. If I was optimizing, I missed a few opportunities to trim. That said, it is an easy to read and understand program. It is short, simple and effective. Just my kind of program.
One last thing. If you want to run this program on your Android phone or tablet you can download a compressed copy of the program to your device. You'll need to save the .p version of the program to your device to allow Zed Ex (Beta) to run it.