Introduction

[ZX81]

Celebrating Programming!


Welcome to my ZX81 Computer Site! I'm continuing to celebrate ZX81 programming by showcasing each month an original program from the eighties.

January's Program: Road Hog

Programming: 01/14/12 at 11:49:06 MST by Steven

Programming [Road Hog 1983]Welcome to the new year! Starting off the second season of monthly programs is January's program Road Hog. Road Hog is a driving game similar to my later Flywheel game. I hesitate to call it a racing game as there is no acceleration. You just move the car left or right using the "z" or "." keys. The game is pretty easy due to the slow speed of the animation. Go give it a spin.

Road Hog is a pretty simple game overall. Interestingly, the road is calculated. This is very slow in the ZX81 and I had to use FAST to speed up displaying the road. In later programs, I would just print the complete track which is much faster at the cost of using more memory.

The cars are displayed using simple print routines. I was trying to recreate the feeling of a car coming at you. To do this, I used a series of IF statements against the car's position to determine what size of graphic to display. There are two minor issues that would have improved the program. The first would be to erase the car just before printing it in the new position. Doing so would have reduced the flickering of the image and left the car on-screen longer. The second change would have been to move one line at a time instead of two. Had I done that I could have changed the way the car was erased which might have shortened the code and speed up the program.

I did a better job on the car you are driving. It uses blanks on either side of the image to quickly erase your movements. The ZX81 was does better if you can print all at once. As soon as you have to separate the print statements, the latency introduced by the ZX81's design is obvious. An easy way to improve that is to use assembly code instead of BASIC. However, as the ZX81 lacks a direct compiler, I tended to avoid that route in almost all of my programs. The ZX81's temperament where hangs and reboots are common doesn't help. Although, this is a problem if you are using an emulator.

As I entered the program, I got a feeling of how I originally developed this program. The mismatched line numbers tell me two things. I tended to use trial and error programming, so if something didn't work I would add more lines of code as I fixed problem areas. Second, I would add features as I thought of them. For example there is a care counter, a simple FOR loop. I later added a day counter that is incremented when the care FOR loop completes. I must have redone the display routines based on my use of variables to house the subroutine locations. I don't remember doing that in many of my programs unless I needed to jump to different GOSUB locations using a variable. It is fun looking for these hints into my teenage programming habits.

Well, that is it for this month's program. Until next time! [ View Article ]

Printer Friendly version - January's Program: Road Hog  Send to a Friend   (7 reads) [ 0 comments ]

Tags: car  drive  driving  hog  january  monthly  race  racing  road  zx81 

A New Year of ZX81 Programs

Programming: 01/10/12 at 23:24:28 MST by Steven

Programming Well, the celebration of thirty years since the introduction of the ZX81 is now over. For the last year I've been bringing you an original ZX81 program each month as a tribute to my first computer. It was a lot of fun typing in those old programs or fixing tape recordings I made back in the eighties. I even rewrote one which brought me back to those old programming days. For those that found your way here, I hope you enjoyed my ramblings about the programs. Perhaps you've learned something or I just invoked a kinship from a fellow programmer.

Since I still have a number of printouts lying around, I've decided to continue my habit. Each month, I will introduce another ZX81 program from my stash. Even if others never find these programs useful, it is forcing me to save more of my fading printouts. The goal of uploading another program each month presented me a challenge that I found difficult to ignore. I contemplated going for a weekly update, but I have other interests and didn't want to burn out over the year. It may take me a few years to get through them all, but at least I'm making progress.

I actually have my latest program ready to go, I just need to upload the picture and write the article. As a hint it is a driving game! [ View Article ]

Printer Friendly version - A New Year of ZX81 Programs  Send to a Friend   (4 reads) [ 0 comments ]

Tags: celebration  monthly  program  thirty  years  zx81 

December's Program: Creature

Programming: 12/03/11 at 17:59:42 MST by Steven

Programming [Creature]I can't believe December is here and the year is almost over. To celebrate the last program of the month, I present Creature, an animation program. Unlike many of the smaller programs submitted throughout the year, this one is the largest weighing in at 14KB. Although Creature isn't as exciting next to more modern computer animations, I still find it interesting to see what could be done with this little machine 26 years ago. Give it a watch, enjoy the nostalgia, and try not to laugh too much.

The program itself is complex, cluttered and repetitive. It gets the job done, but not always elegantly. Than again, I was fifteen and using a machine that didn't always lend itself to elegance. As I was typing in the program, I found myself thinking about how to improve it. For example, when I shoot the letters from the U.F.O., I should have reversed the print and erase to avoid the double characters being displayed. I probably could have found a better way to add delay between animations. Even better, I wondered if I could have created a generic sprite rendering system. At least I did reuse some of the animations.

If you remember my Beo One program, you'll find a similar speech animation here. I used a variable fed to a subroutine to display the spoken text throughout the animation. I was actually surprised that I'd added eye blink in addition to the mouth movement. This made the floating head look a bit more real. However, I kept thinking that I should have toned down the frequency of blinks. Overall, the effect works well considering the head isn't a human likeness.

I was really attempting to add depth to the animations in this program. Although most of the animation is simple horizontal and vertical movement, I did add rotations, animated sprites, and 3D perspective as objects moved in and out of the background. There are also many nods to classic 80s films like Tron and Star Trek. Can you find them? Obviously, the Dungeon Master reference is from D&D, a favorite game of mine at the time. The mash-up of genres adds to the overall craziness of the animation. I chuckled a bit as I watched this as it reminded me of the various demo and intro programs that were popular on my Amiga. Perhaps I was ahead of my time as I don't remember much of a demo scene for the ZX81.

Well this wraps up the official monthly program's for the 30th Anniversary of the ZX81. Having a goal of uploading at least one new program a month was successful, ensuring that at least 12 of my programs are now preserved. However, I still have a large collection of programs to convert. Considering I found serval candidates for this months program tells me not to give up yet. This year may be winding down, but I plan on continuing to showcase at least one new program each month. Given the stack of printouts next to me, I won't run of material anytime soon. [ View Article ]

Printer Friendly version - December's Program: Creature  Send to a Friend   (21 reads) [ 0 comments ]

Tags: animation  creature  dungeon  graphic  master  programming  star trek  thirty  tron  zx81 

New RSS Feed

Announcements: 11/20/11 at 08:48:27 MST by Steven

Announcements As of today, you can use RSS to subscribe for your monthly dose of ZX81 goodness. I originally hadn't planned to offer an RSS feed for my ZX81 site. The original goal was to cross-post articles to my main site and rely on its feed for subscribers. Sadly I tend to forget to cross-post. Your browser should automatically find the new RSS link. If not, I've provided an RSS for Posts link to the right. I use Google's Feedburner service to manage my feeds and ensure optimal compatibility. You can learn more about this change from my recent blog post: Hacking Up RSS. [ View Article ]

Printer Friendly version - New RSS Feed  Send to a Friend   (24 reads) [ 0 comments ]

Tags: feed  feedburner  google  rss 

November's Program: Lander 2

Programming: 11/03/11 at 21:05:30 MST by Steven

Programming [Lander 2]November is here and the year is flying by. This month's program Lander 2 is an earlier one from 1983. Oddly, the game displays Space Lander. Not very original as I've used that name before. I'm using the name I noted in my listing.

Although it has graphical elements, it is really just a counting game. There are no arcade movements like many of my later games. A platform is randomly placed and you enter in how far to move the ship. There is no physics, fuel or other strategic elements at play. Simple, right? Agree, yet my high score is only 601. Can you best my score?

From a technical standpoint, it is pretty straight forward game. Based on the line numbers, I added parts and pieces as I built the program. Just so you know, that really bugs me. I'm a bit of a syntax freak, often prettying up my code. Renumbering on the ZX81 is a pain, though, so I'm not surprised that I didn't bother.

Looking at the code, the graphics are straight forward sprites. I used simple print with spaces to emulate movement. Oddly, I let the space ship fly through the landing pad before crashing it. It would be an easy fix to test during the loop or calculate how far to fly. But in the end it doesn't really detract.

The fewer moves you make, the better your score. There is an amount of randomness in how many points you get. Oddly, I only display your score when you crash and the game is over. Interestingly, if you move one space at a time, you might actually lose points. Sneaky, huh?

Well, that is all for now. Enjoy the game! [ View Article ]

Printer Friendly version - November's Program: Lander 2  Send to a Friend   (25 reads) [ 0 comments ]

Tags: count  crash  graphic  lander  point  programming  space  thirty  zx81 

Main Menu

Feeds

Tag Cloud

Login

Username:
Password:
 Remember Me?

Forgot password?
You are a guest user.
You can register for free by clicking here.