Water Bug Was My Attempt at a ZX81 Action Game


A deep dive look at my ten board opus from 1984 for the ZX81 Home Computer.

For most of the day, I’ve been thinking about my Water Bug game as I never really gave it a proper write-up. Finally got around to playing it again, I was surprised to find elements in that I thought were unique to Water Bug II are actually in this version. That made me want to walk through each board, understanding better what I had done, what worked, and what didn’t. Let’s dive right in.

# Before we get started.

To manage this review, I played through the game as best I could. Because I know a bit about the structure of the program, I could cheat a bit and test play each board. Note that isn’t how a normal player would progress. I’ll talk more about that later. Overall, it was fun to play each board again and remember what I had designed. I also found a bug or two which I'll talk through. To make the game playable, I did fix some of the blatant bugs. Otherwise the game is as I wrote it in 1984.

Water Bug, Intro, ZX81 Screenshot, 1984 by Steven Reid.Water Bug, Intro, ZX81 Screenshot, 1984 by Steven Reid.

Now, playing through I did wonder if I have a multiple versions of Water Bug. I could have sworn I played through all the levels when I wrote it, but found one that didn’t work at all. I’ll go back and check the listings later. In general, the game I remember is there. My cheats, favorite boards, and game play are all there as I remember them. But some of the frustration and randomness is as well. Let’s dig into each board and see how each fairs.

# Board 1: Starting your adventure.

Board 1 starts out pretty simply. You, the inverted O, move to get the treasure, the inverted dollar sign, while avoiding the enemy, the inverted asterisk. For some crazy reason I print the score at the top, which updates each move. That is a bad idea on a ZX81 as printing a number is horribly slow.

Water Bug, Board 1, ZX81 Screenshot, 1984 by Steven Reid.Water Bug, Board 1, ZX81 Screenshot, 1984 by Steven Reid.

If you look at the code, I tried to use a STR$ thinking it would be faster. Just a note, it isn’t. I’ve timed both and they basically use the same speed. Behind the scenes, the routine that converts floating point to a number is what causes the slowness and it is used for STR$. Well, at least I tried.

In a way, though, starting the game out a bit slower isn’t all bad. On some boards, the play will be pretty slow due to all the moving elements. This lets the player get used to the slower speed. But still, I could have at least kept the game going faster at the start. Especially given the following enemy is pretty easy to dodge. It is a random slowness, so not quite the best strategy. At times the enemy is very good at following. At others it struggles to realize you passed it by.

Now, a note that the enemy movement check is after your move. Because of this, it can easily end up on top of the player. It can also jump in front of you, which ends up being a hit. This can be a bit confusing and frustrating. I’d call it a bug, but given it is consistent throughout the game it probably isn’t worth fixing. The randomness can make a board easy, or extremely hard. But, that is Water Bug.

One last problem is the score itself. You get a point for each move. Yeah, talk about incentive to just move around the board and rack up points. Worse, I use a random score at the end of each board. Thus, the final score is a bit of a crap shoot and doesn’t equate to skill. Fortunately, finishing a level provides satisfaction regardless of score.

Sadly, using a random score was common practice in my games. I’m not sure why I thought that it was a good idea, but in Water Bug it is pretty egresses. Your completion score is INT(RND*10*100) or basically a number from 0–1000. I think I meant it to be INT(RND*10)*100 (from 0-1000 in increments of 100). As written it wouldn’t work that way and doesn’t really matter.

Now the idea of a per move score isn’t necessarily bad if it showcased skill. But a better scoring system would have been to use a timer and give you points based on how quickly you finished a board. Example would be 100 moves, with one point taken for each. That way, there is variability but also a max. You can’t just run around the board racking up points. A set score per board would also have been better.

Upon completing the board, the game will print your score and a pirate sounding message: “Yee got thy treasure. Horay all.” Spelling aside, I guess I was thinking the Water Bug was a pirate? I really should work on continuity of the story. I did add a pretty neat effect at the end. I print a bunch of squares—seaweed maybe? It acts as a bit of a transition effect. This is something I thought was only in Water Bug II, but here was plain as day in the first game.

# Board 2: figure out the trick.

Board 2 is pretty much the same as first, now full screen and no score. As such, it is a noticeably faster to move around. Although, there is something missing—there is no treasure. Instead, you have to search around for it. This is a good example where skill doesn’t matter in this game. You really just have to move around the screen until you find the treasure.

Water Bug, Board 2, ZX81 Screenshot, 1984 by Steven Reid.Water Bug, Board 2, ZX81 Screenshot, 1984 by Steven Reid.

I thought I was being clever at the time. It was a conscious decision that you had to know the pattern to find the treasure. I remember thinking how cool it was. It was kind of an easter egg, but required to move forward in the game. But think about the pain of playing this board if you don’t know that? You might just stumble on it by accident, but it won’t make much sense until you do. At least in the current version you’re racking up points while doing that. Yeah, that again.

Water Bug, Board 2 Complete, ZX81 Screenshot, 1984 by Steven ReidWater Bug, Board 2 Complete, ZX81 Screenshot, 1984 by Steven Reid".

Now, the way to get the treasure appear is to run along the bottom of the board until it appears. If you don’t know to do that, it will be a pain to get. It isn’t obvious nor is it fair. Now, since I wrote the game and was the only to play it, fair didn’t really matter. Another game that did something similar was E.T. for the Atari VCS (or 2600 if you bought a later one). To find the landing pad, you had to move around the board until you found it. I’m sure there was more to it than that, but the precedence was there.

# Board 3: scrolling fun.

Getting past the second board, we start to get into the fun parts of the game. Board 3 is a scrolling level. You get to watch as it builds the level. It might scare you at first, but the level actually scrolls into the board so you can get ready to enter the water and find the treasure. It is kind of a neat effect. The water than scrolls with the seaweed moving up. It is actually a pretty fast process, one I will use elsewhere in the game.

Now the code is pretty simple. I basically build an array with all the seaweed. That is the first part. Then there is a loop that prints the portion of the array for each line. Yep, no SCROLL here! Lastly, the array is printed and rotated each turn. It is almost like three different games on one board. Neat.

Water Bug, Board 3, ZX81 Screenshot, 1984 by Steven Reid.Water Bug, Board 3, ZX81 Screenshot, 1984 by Steven Reid.

Now there is the possibility that the treasure could be printed underneath another adjacent seaweed. This would make it impossible to clear the board. I haven’t seen it that often, but the possibility is there. As an aside, Board 3 was originally the last one in the game. All the code pretty much ends here. If I hadn’t kept going, that would have been it.

Instead, I decided to keep going until I got to ten boards. The rest all have similar code bases to the first three. Funny, I had some code reuse for things like movement. But, there is a ton of code, such as endings and transitions are repeated for each board. I could have made all that a subroutine. Instead, I just copy and pasted the routines for each board. It is pretty easy to do in the ZX81. Just list a line, edit it, change the line number, and save it. Easy to do.

Now, I’m not surprised that there is a mix of reuse and not. I didn’t do code reviews back then. I reused the obvious stuff as it was part of the routine. Funny enough, there is a REM in 860 where I was using a local check for movement, but then changed it to use the generic one. But it was often easier to just keep things simple and copy code that made sense. I’d do things different now.

# Board 4: chasing treasure.

Back to the boards, Board 4 mixes things up with pillars all over the place. There isn’t an enemy here though. Instead, the treasure is running around randomly. You just need to go grab it. It sounds easy, but can be a bit of a pain at times. But with no tricks, this board is over as quickly as you want.

Water Bug, Board 4, ZX81 Screenshot, 1984 by Steven Reid.Water Bug, Board 4, ZX81 Screenshot, 1984 by Steven Reid.

# Board 5: hit the switch.

Board 5 is my favorite. This one uses some of the techniques of Board 3, but mixes it up with a new game mechanic. The top of the board is split into three chambers. The bottom is a rotating seaweed field. Your goal is to navigate the field and get to the middle chamber first where there is a switch—an inverted minus sign.

Once you get to the switch, the treasure appears. You then have to navigate the seaweed again to get to it. It isn’t a hard level, but I like the change of pace. Needing a different strategy than before, it takes Water Bug in a different direction. The level feels fast, plays well, and I just like the overall feel of it. Underneath, it is just a mix of an array with a few logic checks. But still, a great little change of pace.

Water Bug, Board 5, ZX81 Screenshot, 1984 by Steven Reid.Water Bug, Board 5, ZX81 Screenshot, 1984 by Steven Reid.

I probably like this board the most because it was my first real creative board. Until now, most of the game mechanics were things I had done before. It takes some of the code of Board 3, which is just a refined scrolling and dodging game, and makes it something more. There are perhaps better boards in Water Bug, but this one will always be my favorite.

# Board 6: Tag, you’re dead.

Board 6 is one I don’t like at all. In this case, the asterisk is white and just moves around. The intent is to play a game of tag with your enemy. Go touch it and run! But, remember that random part I told you about, the enemy might move with you and game over. The fact that there are no lives, means that this can be a very frustrating board if you die here. This is why I think I should have either added lives, or at least let you replay a level.

Water Bug, Board 6, ZX81 Screenshot, 1984 by Steven Reid.Water Bug, Board 6, ZX81 Screenshot, 1984 by Steven Reid.

# Board 7: beware of the snake.

Board 7 is another change of pace. This time, there are a bunch of random asterisks printed and then the normal enemy follows you like Boards 1 and 2. Unlike those boards, the enemy now leaves a trail. That means, if you aren’t careful, it will cut you off from the treasure. It isn’t a super hard level, but does feel like it ups the anti in game play. I like this level as it is innovative. Feels a bit like you’re being chased by a snake.

Water Bug, Board 7, ZX81 Screenshot, 1984 by Steven Reid.Water Bug, Board 7, ZX81 Screenshot, 1984 by Steven Reid.

# Board 8: bob and weave.

Board 8 is a bit tricky. It starts to add a couple of different elements. There are two moving barriers, an enemy, and a switch. For this board, you have to move to the switch and then head back up to grab the treasure. Sounds easy, right? Not quite. The movements are pretty tight. The moving barrier has different holes it making it hard to predict easily. I like this board, but it can be frustrating. Not as much as number 6, but still tough.

Water Bug, Board 8, ZX81 Screenshot, 1984 by Steven Reid.Water Bug, Board 8, ZX81 Screenshot, 1984 by Steven Reid.

# Board 9: building up to the action.

Board 9 looks hard, but is actually not to bad. It is a bit like 5, except there are 4 chambers. You move around between switches until the last one where both an enemy and treasure appear. Now, I struggled to get the enemy to follow me out of the cell, thinking that a good strategy to get around it. But the easiest past is to just head in and go. Usually, it isn’t fast enough to get to you.

I did check the code, and nothing prevents it from leaving. I’m guess it is just the random routines. It won’t move through walls, so that might be part of the problem. I didn’t try to guide it out, so it just fails if the move isn’t on a tile. But I did see another problem. For each move where the treasure doesn’t exist, it is using a GOSUB to skip some the enemy checks. However, there is no RETURN statement. If you played long enough, the stack would fill up memory and the program would crash.

Water Bug, Board 9, ZX81 Screenshot, 1984 by Steven Reid.Water Bug, Board 9, ZX81 Screenshot, 1984 by Steven Reid.

Now, there must be enough memory because I’ve never actually crashed playing that board. I tested by just sitting at the board to see if I could get it to crash. So far it seems to hold up well in my testing, but it should eventually fill up just the same. To make sure things were working, I did verify that a RETURN would pop the right value from the stack. It does. In any case, I fixed the bug so that game would play correctly and not crash.

# Board 10: let’s finish this!

Now Board 10 is a modified version of Board 8. A column now splits the level with a single moving barrier. You have to make your way through the moving barrier and hit the switch. Once you do that, the barrier moves to the top. You have to then navigate into the right chamber, avoiding the chasing enemy, and grab the treasure.

Water Bug, Board 10, ZX81 Screenshot, 1984 by Steven Reid.Water Bug, Board 10, ZX81 Screenshot, 1984 by Steven Reid.

Now, I must not have tested this board well. While playing it, I couldn’t get into the second chamber. I think when the barrier moves to the top it was supposed to switch directions. The way it was written, the gap wasn’t large enough to squeak through to the other side making it impossible to clear. I may have fixed this in the original code, given this was loaded from tape and possibly an easier version.

Water Bug, Board 10 Complete, ZX81 Screenshot, 1984 by Steven Reid.Water Bug, Board 10 Complete, ZX81 Screenshot, 1984 by Steven Reid.

Not having a chance to check the code, I went ahead and corrected the issue. I thought the fix would be a bit more involved, but after some thought I took a different approach. Since you really don’t need to traverse the barrier at the start, I went ahead and swapped directions. This made the fix simpler and the board can now be completed.

# In closing.

Water Bug has a lot of other fun elements in it. I had a title screen baked into the load. There are a lot of fun touches with the different boards and changing strategies. It was difficult, but not impossible. In all, a great game and why it is still one of my favorites. Next up, I’ll walk through Water Bug II and all the changes it brought to the table.



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