February’s Program: Telaport

Grab cubes, avoid monsters and jump into the teleport to escape this ZX81 game.

Telaport, 1984Digging through my listings, I struggled deciding what to offer for February. The first one I found was an adventure text game. Too close to last month's program, I decided against it for now. Further down in the stack, I found a code breaking program, but after entering it in I realized it needed work. The next program I pulled out, a graphic game called Teleport—ignore that spelling for now—ended up being just right.

Using the ZX81 arrow keys to move, you need to grab up the cubes for points. This is the best way to rack up the score, but as is typical for my games, you have to dodge a few monsters to get to them. They aren’t the quickest of creatures, but they can swarm you if you aren’t paying attention. Lucky for you, there is an out. Four teleport locations, designated by inverse T’s, afford you an escape.

Those teleport stations can be both good and bad. Since the location chosen is completely random, the bad is that you may teleport right back to where you started. This isn’t a great feeling if a few monsters are right on you. In those instances, you may find yourself spamming the teleport to get away.

Yet, if fate is on your side, you will first find your character dropped into the lower area of the game. There you will run across the blocks and, at random, fall through with a few bonus points added to your score. I’m not sure why I added the little animation, but I’m glad I did. It is a nice little bonus to an otherwise standard grab and dodge game.

Code wise, Telaport is your standard ZX81 BASIC affair. The first 18 or so lines are dedicated to Setting up the variables and painting the display. One thing I noticed is that the starting places for everything is always the same. This causes the monsters to start all clumped together which gives the player an unintended advantage. Mixing that up a bit would have improved the replay value.

The next 20 lines, from 190-360, are a big loop that controls the main game. The loop is there to replenish the board after 150 moves. If removed, you’d would be wandering around a cleared board without much to gain from it. Those blocks are worth all the points, everything else is just gravy.

Let’s talk a second about those monsters. I used an array, V, to hold their position. Each monster is moved using a loop that adjusts their position based on your location. To make things a bit fairer, there is a bit of randomness in that routine that slows them down. I wrote many of my games this way and it works well. But in this case, it makes all the monsters play the same.

Looking back on it, the simplicity of that loop may have worked against me. The code is tight, but slow. I added a FAST and SLOW routine to make the game more playable. If you’ve followed me for a while, you’ll know that I have a love hate relationship with those routines. The flicker of the display just isn’t worth it. I tested removing them and found the game works well enough, although a bit slower, without them.

The second thing about that loop is that it prevented me from making the monsters unique. Had I used different random values, the monsters would have followed at different speeds. This would have spread them out, adding more interest to the game. Once you get used to their jerky movement, you’ll find it is pretty easy to clear the board.

The teleport routines, from line numbers 600-1030, take up a good third of the code. Using the ZX81’s ability to jump using math, your location is set using a GOSUB routine. There are five locations, one being that bonus area. I could have tightened up the code in a few places, but otherwise works well. And, just in case you were wondering, you can’t get to the end of that run.

The code wraps up with the death message. Yep, you only get one life. Most games, including mine, didn’t bother with retries. I mean, they are pretty small already and death just resets of the score.

Telaport, High ScoreSo, let’s talk about that spelling of Telaport used in the game. I’ll be honest, it is probably just a misspelling on my part, but I’m actually glad I did. Beyond adding a bit of unfinished quirkiness, it makes Telaport stand out as something different. Although I don’t recommend purposefully do this, there is plenty of precedence. For now, let’s pretend I did it on purpose.

And there you have it, a fun little game with enough going on to make it a worthwhile 10 minute diversion. I was able to rack up a high score of 3174 during one of my plays. Can you do any better?

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