Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Play Tetris in Terminal via emacs UNIX
I could not find this as already hinted, so I thought that maybe someone does not know about it and/or finds it "useful." Open up a Terminal window. It doesn't matter which shell you prefer; I use tcsh. Type in emacs and press Enter. Once it's loaded, press and release Escape, and then type x. At the bottom of the screen, you'll see M-x; type tetris and press Enter.

You're now playing Tetris within emacs. Use the arrow keys and space bar (to drop blocks) to play. When you are done, a highscore will be generated at /tmp. You can then exit emacs by pressing Control-X followed by Control-C.

[robg adds: I modified the above instructions to be a bit more detailed than as originally submitted. Also, if your $TERM is set to VT100 (in Terminal Preferences), you'll get a black and white version with 0's instead of the colored graphics version shown here. To see the colors, set $TERM to ansi.]
    •    
  • Currently 3.33 / 5
  You rated: 4 / 5 (9 votes cast)
 
[71,841 views]  

Play Tetris in Terminal via emacs | 15 comments | Create New Account
Click here to return to the 'Play Tetris in Terminal via emacs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Emacs...
Authored by: TrumpetPower! on Jan 05, '05 12:28:02PM

Emacs is a nice operating system. Too bad it doesn't have a good editor.

*ducks*

Cheers,

b&



[ Reply to This | # ]
Play Tetris in Terminal via emacs
Authored by: paulsomm on Jan 05, '05 01:06:34PM

another reason i like VI . . . no bloat



[ Reply to This | # ]
A bloat-free editor
Authored by: jeramey on Jan 05, '05 02:52:58PM
If you really hate bloat in your editor, you should use ed, man! !man ed

It's the standard! Ed doesn't waste your time by gobbling up memory or getting in your face with a weird, inconsistent user interface. Try it today!

[ Reply to This | # ]

A bloat-free editor
Authored by: osxpounder on Jan 05, '05 05:05:23PM

Wow, all those kilobytes of bloat. How can you stand it?

---
--
osxpounder



[ Reply to This | # ]
A bloat-free editor
Authored by: shavenyak on Jan 06, '05 09:32:57AM

ed? My God, that thing is bloated as hell! I use cat as my editor. No fancy junk like going back and correcting your mistakes! I still remember when programmers were MEN, not little sissies whining for syntax highlighting in their editors. Punch cards, tape reels, and disk drives the size of washing machines... now those were the days....



[ Reply to This | # ]
Play Pong in Terminal via emacs
Authored by: cello on Jan 05, '05 01:20:44PM

yeah, talk about a bloated editor... emacs offers pong too (for 2 players). Just enter "M-x pong" (M-x again equals to escape-x). One player can use the arrow-keys, the other the numbers 4 and 6.
Have fun!



[ Reply to This | # ]
Play Pong in Terminal via emacs
Authored by: GaelicWizard on Jan 05, '05 11:38:42PM

Actually, emacs is not that bloated. It has a great lazy-loading system and all these "goodies" are provided as packages. If you don't use them, they're not ever read from disk.

JP

---
Pell



[ Reply to This | # ]
Faster tetris start method
Authored by: jeramey on Jan 05, '05 03:11:13PM
Another way to jump straight into emacs' tetris mode is by starting up emacs the following way:
$ emacs -q --no-splash -f tetris
You could, if you wanted, create a shell alias like this in your .bash_profile file which would allow you to start it up very quickly by simply typing 'tetris':
alias tetris='emacs -q --no-splash -f tetris'
Oh, and selecting xterm-color instead of ansi for your terminal type in Terminal.app's preferences is more compatible. You'll experience fewer weird display problems that way, especially if you ever ssh or telnet to other systems.

[ Reply to This | # ]
Play Tetris in Terminal via emacs
Authored by: Zeitkind on Jan 05, '05 07:18:08PM

Try "snake" also.. ;) Or
doctor, hanoi, gomoku, blackbox, mpuz, 5x5, decipher, dunnet, lm, life, morse-region, pong, solitaire, studlify-region...



[ Reply to This | # ]
Play Tetris in Terminal via emacs
Authored by: poenn on Jan 06, '05 06:39:27AM

Cool, I didn't know of the other games, thanks! :-)



[ Reply to This | # ]
Play Tetris in Terminal via emacs
Authored by: Zeitkind on Jan 06, '05 08:20:09PM

Well.. just look at the sourcecode.. 19.9MB.. I wonder, if there isn't a quake-engine also included.. ;)



[ Reply to This | # ]
Play Tetris in Terminal via emacs
Authored by: grace.y on Jan 05, '05 09:01:59PM

Hi,

I am a really beginner with Mac and Terminal. After I applied this hint in terminal, I have noticed that my Tetris did turn out to be the black and white version.

I know Rob mentioned that if $TERM is set to VT100 (in Terminal Preferences), it'll show up as B&W version. And if I like the color version, I have to set $TERM to ansi.

Maybe what rob said is very obvious to many advenced Mac users out there, but I have tried to change mine into color version without luck. Can somebody be kindly walkthrough the steps for me on how to change the $TERM to ansi? I'll be very very appreciated for your help!

---
Do not be arrogant because of your knowledge; Speak with those who know as well as those who do not - Ancient Egyptian Ptah Hotep



[ Reply to This | # ]
Play Tetris in Terminal via emacs
Authored by: robg on Jan 05, '05 10:37:54PM

Look in Terminal -> Preferences; you'll see a drop-down menu where you can set $TERM. Then just open a new Terminal window after changing it.

-rob.



[ Reply to This | # ]
Play Tetris in Terminal via emacs
Authored by: unixgeek451 on Feb 06, '05 11:33:42AM

When I went to Terminal preferences, it just had two things- /bin/tcsh and open a saved .term . It had a select from file thing, but I don't know were to find it. sorry to be such a bother- im just a beginer



[ Reply to This | # ]
Play Tetris in Terminal via emacs
Authored by: unixgeek451 on Feb 05, '05 11:57:13PM

Yes, please help. Im also a begginer and have no idea what that that means -thanx



[ Reply to This | # ]