Dodging games were the rage back in the early 80s. Wanting to add my own take on the genre, I created Stick Shift, Novembers program of the month. The goal is simple. Dodge other cars, oil spills and spikes while not crashing into the wall. Mess up? Well, its game over for you. Dont fret though, it isn't that hardyet.
Shift and dodge.
The game play is pretty simple. Using the arrow keys, you move (5 & 8) and shift (6 & 7), make your way through each stage for extra points. If you do, the course gets narrower, making the dodging harder.
You start the game in low gear. Shift up to speed things up. Its not much, but enough to notice. As things get tight, you can shift down to the slower speed. Note that you wont get any points when moving slower. So, use it when it helps, but speed up again when you can.
Also note that you can drive over the edge of the track before the side wall. There is a catch though as you wont get any points, or worse. If you are in low gear, youll lose a point. This game play is unusual for my programs, but makes sense in a driving game.
Those obstacles seem well spaced.
Code wise, Stick Shift works as a pair of loops. The outer loop acts as the the stage counter. The inner loop acts as the obstacle counter and will shrink as the game progresses. This makes the course more littered as you progress. It also shortens each stage.
As noted, you can shift speed up or down. Line 300 does this by setting a variable with some time consuming math. As Ive noted before, you can slow down the ZX81 using its
COS and other complex math functions. To make the code shorter, I also used the ZX81s unique
The rest of the code is interesting as well, but I wont go into details. Ive talked about the various techniques in the past. There are a few places I could change, but wont. The program is great as is.
Thats a wrap.
And there you have Novembers program of the month. A great little game that is fun with a good amount of difficulty.
Originally published at www.reids4fun.com on November 24, 2016.