Play Games In Terminal 30


Play Games In Terminal


This is a very cool trick that enables you to play a couple of games within Terminal. They are only basic games such as pong, tetris and a few others. Its simple to do and only requires the use of Terminal and a little bit of know how.

The first step is to find what games you can play. This tip using an old unix program called emacs. I haven’t used to till now but it very popular with some programmers. First, open up Terminal (Applications > Utilities > Terminal) and type the following.

ls /usr/share/emacs/22.1/lisp/play

This navigates to the folder play and displays a list of the currently installed games. There will be 2 files for each game. They both do different things. The only thing you need to worry about is the name of the game. You can also find the name of the games by viewing hidden files. If you type the following it shows you all the hidden files on your system you can navigate to the required folder that way. Type FALSE instead of TRUE to reverse.

defaults write AppleShowAllFiles TRUE
killall Finder

Once as the list pops up we can open up emacs and get playing.

The next step is to type emacs into terminal. This will bring up the emacs interface. To enable the command line hold Esc + X. You can then type in the game name. Tetris is shown below.

If you want to play another game press Esc + X. To quit emacs press and hold Ctrl and then press x then c. This will close emacs.

The games are basic but they were designed to be run on older systems, not Core 2 Duo processors. Some of my favourite games are tetris, snake and gomoku. Pong doesn’t work so some reason.

If you have any more tips or tricks for emacs please post them below. I haven’t used this system much I am still learning my way around.

If you want to keep up with the latests post from Mac Tricks And Tips I recommend you subscribe to the RSS Feed.

Where To Next?

  • Subscribe To Mac Tricks And Tips