An Early and Bad Attempt at a Yars’ Revenge on the ZX81


Not all of my early programs were even good, but they added to my growth. Yars’ is one example.

Like many teenagers in the early eighties, I was playing video games on my Atari VCS. Yars’ Revenge was a popular purchase, and I spent many hours dodging that stupid missile and trying to take down the shields of the Qotile. It then should come at no surprise that I tried to recreate that game at 13. My attempt on the ZX81 didn’t look horrible, but it sure played bad. Let’s see how much.

Using the world around me.
Starting at the beginning, I found my version of Yars’ Revenge scribbled in my old programming notebook. It is one of my earliest ZX81 games. A such, I wasn’t expecting much. Still intrigued, typed in the program. As I did, I realized how brute force the game design was. It was obvious how early an effort this was. Mixed in with Atari 800 programs, I was still learning to program. It shows.

Yars’ Revenge, a ZX81 Screenshot, 1983 by Steven Reid.Yars’ Revenge, a ZX81 Screenshot, 1983 by Steven Reid.

Overall the games pieces are there. There is a black background, a shield wall, Yar and the Qotile thingy. If you are outside the shield and fire or are on top of the Qotile you'll injure it. Eventually you'll either win or a random roll will kill you. Originally, you moved or fired using the cursor numbers using an INPUT command. This meant that the screen paused each input. That is odd as I use INKEY$ elsewhere. My guess is that I didn’t have that play mechanic in my head yet. I was still coming off old terminal programs, not writing arcade games.

Sprucing it up to run.
To make things work a bit better, I changed the INPUT to an INKEY$. It makes the game a bit more fluid, but still not great. The screen is redraw each time which is pretty slow. Even worse, I print the shield wall separately, doubling the time it takes. An easy fix, but I left it for now.

Typing in the program, it was clear I hadn’t tested it. The graphics and titles printed slightly off. Those were easy fixes. With more work, I could redo the whole screen refresh routine to speed it up, or even drop it using some other way of moving Yar. The random nature of you death isn’t very clear, nor is the objective. Those would need to be fixed as well.

[Image]Yars' Revenge on the ZX81 by Steven Reid, on Flickr

Contemplating what I could do now.
Thinking about what I’d do different, it depends on what language I rewrote it in. If in BASIC, I’d clean up the display and movement. There isn’t much on screen so I could easily add in the missile or have the Qotile swirl try to hit you. It may not be real time, but I could see it working.

If using assembly, I’d try to recreate the original feel of the game. I could make Yar a sprite and allow some better movement. Not sure if I’d go full 8 axis or just stick with 4, but having different graphics for each direction would look a lot better. Plus, I should have enough speed left to put the shield back in and maybe even move Qotile. The following missile being a key, and annoying, part of the game play. In the end, though, it would still be a poor clone against the original game.

Wrapping up the past.
As with any of my old programs, the code it is more interesting to see follow how my programming developed. I wasn’t thinking about sharing these programs as 13, I was learning. I still kick myself for not learning assembly. That said, I really only programmed on my ZX81 for a couple of years. It amazes me how much this machine shaped my future. Perhaps that is why I still enjoy programing on it.



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