Skip to main content

Writing on the Grid

For our first assignment we experimented with a JavaScript-based terminal emulator. In the early years of computing, terminals were the main interface for computer users. They provided a text-based interface for entering commands and receiving the results.

I wasn't around back then but as a kid when I started learning about computing one of the computers I used was a Commodore 64. During Allison's lecture I was reminded of the kinds of programs I wrote with that computer. It was a limited machine but with some effort I could program it to create simple games. One kind of game I made many times challenged the user to navigate through a maze. For whatever reason I was fascinated with mazes and created many versions of this theme over the years. For this assignment I had the opportunity to make yet another one, and I jumped at the chance.

Building this was a lot of fun and brought back happy memories of when I was first learning how to code. The most entertaining part was of course picking what characters to use for the player's current position and the maze exit location. I picked ൠ for the player and ֍ for the exit.

To play the game you may need to click somewhere on the below maze so that the terminal can capture the keyboard events. Use the 'j' and 'k' keys to move left and right and the 'i' and 'm' keys to move up and down.

When you make it to the end of the maze you will be rewarded with a classic terminal bell. It will also reset and draw a new maze for you to solve.

If you are interested you can view the sketch separately from this page. The JavaScript code is also available if you are curious. The maze generation algorithm I used is a randomized depth-first search algorithm.


Comments powered by Disqus