Try out This Simple and Easy ZX81 Landing Game


The Monster is a horizontal scrolling game that requires you to find your landing pad as you fall.

“TheOver the holidays, I dug through my listings to see what was left. I still have quite a few left, but the pile is definitely smaller. I’m starting to come across games I don’t remember as much. The Monster, this month’s program, is one such game.

Digging into the game.
Since I didn’t remember the game itself, typing it was half the fun. I found myself following the code, trying to figure out what each section did. It wasn’t until I was done that I could play the game and see what it was like.

The Monster is a simple, and very easy, horizontal scroller. Much like my other games, this one uses the ZX81’s SCROLL command, while you use the arrow keys to move. It a dodging game, but not quite what you would expect. The goal is to find a landing spot. Not too hard, expect the original version didn’t work.

You see, in the that version, the line that created the landing pad didn’t match a pattern that I would check for in the code. Oops. I made a couple of fixes so that the game actually used the landing code. Fortunately, it isn’t hard to figure out what you can land on, and what you can’t.

Needing a back story.
When I started to type it in, I was expecting a different kind of game given the name. I thought it might be an adventure game of sorts, thinking that maybe you fight the monster. Nope, that wasn’t it at all.

After playing it, and not remember what I had in mind when I wrote it, I decided it needed a bit of a backstory. I decided that the setting was at sea. Your submarine was attacked by a monster, maybe a giant squid, and is sinking into a deep trench. You have some ballast, so you can move a bit to avoid the rocks. But, you need to find a landing spot.

As luck would have it, there are beds of seaweed fixed between the rocks. You search for seaweed that is wide enough to accommodate your craft, but the rocks make it difficult. If you can land on the seaweed, it might slow your fall some. If not, the rocks may wreck you.

Of course, I could have used some sort of space theme as well. But, given I’ve done so many of those, the sea theme seemed appropriate.

It’s about the score.
Now, the game is super easy. In fact, I think it is too easy. Even in its original form, you could let the game play itself to see how high a score you could get before crashing. Not too fun.

The idea, as I dug into it, was to take away points as you hit the wrong thing. Not a bad idea in concept. But given the game doesn’t track high-scores, and seeing how easy it is to avoid things, it doesn’t make sense to try.

I’ll give myself credit, at least I was trying to do something different by using score as a major driver for the game. Besides losing points, moving toward the bottom allows you to game more. In theory, but not in practice, this makes the game harder. Landing does give you a 100 bonus points. A quicker way to rack up a high score.

There is only one combination that will actual kill you, and that is landing on two of the inverse asterisk. Once you figure out the game, it isn’t that hard to avoid crashing. And, to that point, is it’s weakness. Without any kind of drama, the game gets boring.

“TheFixing a few things.
As I noted before, I had to fix a few things. Line 60 in the original code printed two different types of seaweed. The idea was to take away more points if you hit the thinner seaweed, where it wasn’t enough to slow you down. Yet, what I printed didn't match what the game checked for.

To fix it, I removed the two types and tweaked the landing code. I could have corrected line 60, but decided this was faster. As such, there is one line of code that I left that doesn’t do anything. Line 180, which removes points, never works because of line 150. A simple fix would be to make it an OR, taking away points for a near miss.

Interestingly, I convert the key press into a number. In most games, I don’t bother as the number takes up more memory than testing for characters. But, the routine works fine.

I had a lot of issues with displaying the ship when I went to play the game. For example, I found that moving down wouldn’t actually clear it from the screen. To compensate for that, I added line 88. I also tweaked most of the print routines and moved the ship’s playing range down by one.

These tweaks made the game more playable, fixing some obvious stuff. But, there is a lot more I could have done.

Some interesting code.
Although not obvious if you are using the JavaScript emulator, the Monster takes advantage of the ZX81’s different speeds as an effect. In this case, it alternates between FAST and SLOW at the start. On the original ZX81, this was a nice way to get your attention.

In the same, yet different vein, I get around issues clearing the screen by printing over everything after the landing. Using CLS after a SCROLL is painfully slow, mostly due to the way the display is handled. But, printing over the screen was faster and avoided the blinking normally seen.

Lastly, you’ll notice that I’m taking advantage of how slow the ZX81 can be at math. I use the SIN PI statement a couple of times in the code as a delay.

Making it a little better.
One thing I did change was the landing. I actually have two printouts from this game. The change between the two was one printed the landing, where the other only added a score. I decided to combine the two, as I liked the first version better.

Given my backstory and understanding of the code, I would like to have made a few more changes. For one, the idea of different seaweed was a good one. I’d like to fix the whole printing line and do more with that. To make the game more interesting, I should add more stuff to avoid as well.

Although scoring idea was novel, I don’t think it works as is. I need to either create a high-score, or convert it to something else. One thought might be to add a depth counter and if you don’t slow down, you crash or get eaten by the squid. This would add more interest.

Another thought would be a time limit. This would help speed up the game and force you do do something. Your score could be based on each run, with the goal to get the highest score in that time. I’d have to do some play testing to see if that would work or not.

The last thought is that hitting a rock was fatal. This would make the game much more difficult, and with a time limit, force you to attempt landings. I could add in a damage counter so that a few hits weren’t fatal right away.

Lastly, this game, if rewritten with some of the above, would be perfect for using MCODER. This would speed it up, allowing me to make it more difficult over time. I can also take advantage of MCODER’s smooth scrolling.

Well, this is getting pretty long. Lots of things right and wrong with The Monster. Perhaps you’ll take it and make it better. If not, maybe I will. It’s time to wrap up 2018. Until next year!



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