Play Games In Terminal 10

Terminal

Play Games In Terminal

Hey

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 com.apple.finder 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?

10 Responses to “Play Games In Terminal”

  1. 1

    it’s 21.2, not 22.1

    Comment By Gust This Guy on February 26th, at 12:13 am

  2. 2

    Its 22.1 on my computrer. Try updating your emacs installation.

    Comment By James Powell on February 26th, at 8:32 am

  3. 3

    Pong Does Work. It’s supposed to be a badly designed multiplayer game, in which one user used up and down, and the PLAYER 2 uses left and right.

    Comment By Teaton on August 18th, at 5:05 am

  4. 4

    INSTEAD OF PING DO PONG PONG WILL WORK AND IT IS FUN

    l l
    l 0 l
    l l
    l l

    Comment By Bob on October 10th, at 2:40 am

  5. 5

    22.1 works on mine not 21.1 but i guess it doesnt really matter and the best game is *drum roll*

    / ) 0 /\/ G :)
    /__)
    /

    Comment By Bill Anderson on March 24th, at 1:02 am

  6. 6

    It has created a file called .DS_Store that is ugly on my desktop. I try to delete it and it reappears…

    Please help me,

    C

    Comment By C on March 25th, at 3:44 am

  7. 7

    defaults write com.apple.finder AppleShowAllFiles TRUE

    will make .ds)store files show up

    defaults write com.apple.finder AppleShowAllFiles FALSE

    will make them go away

    Comment By orta on April 4th, at 5:18 pm

  8. 8

    22.1 Worked for me, which I can’t say with the previous version. The most annoying thing, though, is the whole Esc+x thing. When I’m at the emacs interface, I try pressing the aforementioned keystrokes and it just brings me to the “;; This buffer is for notes you don’t want to save, and for Lisp evaluation.
    ;; If you want to create a file, visit that file with C-x C-f,
    ;; then enter the text in that file’s own buffer.” Thing. I they ctrl c, ctrl f and manage to type “tetris” at the bottom box, but all it does is starts a new free script page with it saved as “tetris”.

    Comment By Anonymous on April 17th, at 3:38 am

  9. 9

    Mud is very confusing like what are all the controls or phrases you can enter? >:(

    Comment By Bill Anderson on April 30th, at 10:56 pm

  10. 10

    .DS store is a log of what you have done that is invisible. If you change your settings in terminal to make invisible items viewable it will always be there.

    Comment By Kevin on June 4th, at 7:03 am

Leave a Reply

You can use: <a href> <h1 - h6> <acronym> <code> <em> <trike> <strong> <i> <b>