I’ve paused updating this site to focus instead on my primary domain over at . You can still read what crazy program I’ve published this month. Even better, read a few other articles!

Wanting something interesting, I struggled to find a ZX81 program to share. Plus, it was getting close to the end of the month. Digging into my old notebook, I stumbled upon Missile Defense. Although short, I expanded it into a something worth playing. Lets dig deeper.

Signs of the times.

Considering how much time I spent playing my Atari, it isnt surprising I often took inspiration from the games I played. In this case, I used Missile Command as a thin base over what is a basic shooter program. It isnt a very good clone, but it is a decent game in its own rights.

I must have noticed that the inspiration didnt fit, so I had named the game Missiler, which is a fine last name but otherwise has no meaning. In my remake, I decided to rename it to Missile Defense which better fit the gameplay.

After entering in the program, I was surprised with how well the game played. Gameplay is fast and smooth, unlike many of my other ZX81 BASIC games. But, it had some flaws.

Fixing the graphics.

Although the game play worked, it felt incomplete. For one, the players cannon didnt erase its previous position. This doesnt work very well if you are trying to line up your shot but cant see where you really are. Fortunately, it was an easy fix.

The missiles themselves also didnt get cleared after firing. Much like the previous issue, there was an easy fix to this problem. In fact, I took the opportunity to create a clever little animation that backed the missile out once hit. The code was starting to shape up nicely.

As a nod to its inspiration, I added a city skyline under the player to give you something to protect. Also, once failing to stop a missile, the skyline is destroyed and a nasty mushroom cloud will appear above your city. It is a nice touch that is unique to Missile Defense, yet still fits the theme.

Tuning gameplay by slowing things down.

As responsive as the gameplay is, the missiles are actually too fast. This is due to the shorter distance the missiles have to travel compared to your cannon. To counter this, I restricting the missiles start to a smaller area of the screen.

To further improve the playability, I reduced the missiles increment size. This worked well, but got me thinking. I wondered if I could start with a smaller increment and then increase it over time.

Implementing my idea, I added a new variable that replaced the increment in the original code. Now, each time you cleared a missile I would just add to that variable. This had the effect of speeding up the game over time.

To ensure that the game wasnt unfair, I played a number of games to find an upper end value. I landed on .8 as the largest increment that offered enough challenge without being impossible. Even better, the change didnt impact the responsiveness of the game.

A few tweaks to get things right.

With the tuned gameplay and graphics in place, I needed to add some finishing touches. The first of which was a score. The original program ended with no record of your success. By adding a score, you now have something to improve upon with each play.

Adding the increment variable created artifacts when erasing the missile. This necessitated some modifications to correct the glitches. They resulted from a non-integer variable, and was something that wasnt too hard to fix.

The last problem was with the end graphics. When I added the cityscape, I had to adjust the mushroom cloud to destroy the city instead. But the graphics didnt look right until after they went through many changes.

The mushroom cloud itself just didnt look right. I iterated over that specific graphic until I got to the final version. That isnt something I normally do in my programs, but I wanted it to look its best for the final presentation.

Some people believe that the nuclear bomb should be awarded the Nobel Peace Prize, since it scared the major powers away from war by equating it with doomsday.

– Steven Pinker

Note quite the same game.

Although there isnt much more to do, there are still a few things I could do. For one, adding lives or cities to the game would prolong the game. I also thought about rotating the cityscape to make the game more dynamic. Yet, these changes would be purely cosmetic. In the end, they didnt add enough for me to put in place.

The heart of the original 1983 program is there. But, the 2017 version of Missile Defense is a much better game. It is slick, fast and playable. With updated graphics, tuned gameplay and a cleaner presentation, I find it a much more modern game. Well worth the evening it took to get it running again.

Originally published at www.reids4fun.com on July 27, 2017.