Fight Your Way to Victory with This ZX81 Space Shooter
Januarys program of the month is a tricky first person space game.
Nothing starts the year out better than a space shooter. The top of the printout was quite faded, so I wasnt sure about ZTSXXSTZ when I started to type it in. But, once I got the first few bits working I realized I had something worth sharing.
Playing it for the first time.
Im sure I was playing Zaxxon or some other weirdly named game when I came up with the name. The name doesnt matter, but the game looks decent. Looking over the listing, I could see their was a ship in it. Kind of looks like Darth Vaders Tie fighter right? The listing wasn't clear, but I knew it was some sort of space game.
Running the first few lines, I could see the cross hairs and memories started to return. This is a space shooter! Excited, I rushed to enter the rest of the program so I could get it working . Yep, it plays as a remembernot well.
The controls are inverted, as a space shooter should be. They arent what Im used to, so I bungled around a bit. But then the cool part happened. I got shot! A shaking screen, then a black screen with a white band. What a perfect death scene. If only the game played better.
I struggled to shoot even one fighter. The controls were all wonky. Even when I thought Id shot one, it wouldnt disappear. Not that it mattered. As I was closing in, I got shot.
Time for a few tweaks.
Getting nowhere with my test play, I dug into the code. I first reduced the chance of dying. About 25% of the time will a fighter fire at you. And, only 5% of the time will it kill you. This gives you enough time to shift into position and clear the board. Plus, if you take out a fighter, your chances of survival only get better.
Next, I fixed the controls. Im used to the ASDW keys, something Ive written about before. I also moved the fire key to . for consistency. Once adjusted, I wrote some testing code to make sure the shots worked. After a few tweaks, the game was playing as intended. Yet, the ships still werent working right.
Looking over the code, I realized I hadnt actually removed destroyed fighters. Once I added in a few checks, things started to look right. Now that they were clearing, I found that I messed up the routine after you shot all four. Another fix down, and the game was working well.
Play it again, Steven!
With gameplay elements working, I could now test the game again. Although a bit slow, the game is actually fun. You can usually clear a few screens before being shot at. Although I miss the death screen, when it does come you are pretty much toast.
Polishing the game a tad, I added a score when you clear the screen. The game allows for repeat plays now, and runs at load. There are some other minor fixes here and there, but otherwise is the same game. I was an impatient teenif only Id put more time into testing back then.
But, it could be better.
First, I like the game as is. But, I couldnt help thinking about the speed. I dont think it would take much to convert to MCODER. Not only would that speed up the game, but I could add in some extra game elements that are too slow in BASIC.
For example, I could move the ships as well, making it harder to target. It would also be nice to have the shots that miss go past you. Perhaps even allow you to dodge them. At the moment, the fire sequences are static.
I suspect Ill break the death scene converting to MCODER. So, Id need to come up with something else. I thought about a full screen graphic, with you drifting in space with a cracked windshield. As is, the game ends with a simple statement and your score. Kind of anticlimactic. Doing something more there would be fun.
Another idea was adding a shield and upping the shots again. That way, you could see the fighters shoot at your more, but you wouldnt die right away. Adding a health bar to the bottom of the screen should work.
Ideas aside, the game works pretty well. Definitely something you would have seen, or played, back in the early eighties. While you enjoy, I might try some of those ideas. Hmmm.