November's Program: Maze Craze


Hope everyone in the US had a great Turkey Day (Thanksgiving) and are now enjoying the last weekend of November…
[ZX81]

Still Celebrating Programing, Elsewhere!

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

“[MazeHope everyone in the US had a great Turkey Day (Thanksgiving) and are now enjoying the last weekend of November. I’m busy with NaNoWriMo, and a bit behind. So I give you another program from my original ZX81 site, but not yet featured here. November’s program is the month is Maze Craze. It’s not hard, but you might need to graph out the maze if you get stuck. There are actually two mazes. Can you beat them both?

As a program, Maze Craze is a study in reuse. I used a number of routines to represent the different views the maze could take. The actually create the maze, I represented by a number of GOSUB routines. I originally developed the mazes on graph paper and transferred each path into code. A pretty simple process that ends up working well.

For some reason, I used an INPUT instead of INKEY$ to the direction the player wanted to go. I’d probably redo those entry routines if I were to write this again. If I had, I might also have allowed a more free-flowing maze. Perhaps one that you could turn around in and retrace your steps.

For some reason, I also added a PAUSE 1 statement after I printed each corridor. I’m not sure why. Perhaps I was just wanting a small pause between displays, but I doubt anyone would notice a delay that small. The other reason I might have used the pause is to cause the display to flicker. Now that I think about it, that might have been why. Since I only display each square you are standing at, it would be hard to notice that you had moved. Depending on your emulator, however, you may not see the flicker at all.

And there you go. A short little maze to relax to before December.



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