CLI magic: Have fun with ESR

57

Author: JT Smith

By “have fun with ESR” I don’t mean to argue or agree with his politics. Or his philosophy of open source software either, for that matter. What I mean is simply to enjoy his true genius, which is not in writing parables, or philosophy, or politics: but in writing code. So open a console and extract yourself from that GUI mess for a few minutes, noobie. Let’s play some of ESR’s favorite games — on the command line.

Eric S. Raymond is famous for many things, not least of which are his famous papers like The Cathedral and the Bazaar and The Magic Cauldron, two works which have been instrumental in informing PHBs in Dilbertville that there just might be something worthwhile in this free software/open source “thing.”

His exposes of Microsoft’s secret plans and ambitions chronicled in The Halloween Documents are also legendary in certain circles. And all that is fine and good. But let’s not forget, shall we, that the man is a coder. Like most of us he is never short on opinions, and he is not too shy about expressing them. But that’s window dressing. We’re going to look at a few programs he maintains — if we can borrow a phrase from another famous coder — just for fun.

The download page for each of these games is linked to from the game title in the section heading. A man page is included with each source code tarball. You should probably consider reading the man page a prerequisite for game play.

It’s all about greed

After downloading, melt the tarball with “tar xzf filename.” Then cd into the directory created by tar during decompression and type “make.” Assuming a successful completion of the compile, su to root and type “make install“. When that’s done, exit super user mode and play the game by entering its name at the CLI.

The game of greed was originally written by Matt Day, but is now maintained by ESR. Gameplay is deceptively simply. When the game begins, you (the “@” symbol) are somewhere in a field of
colored digits. Movement is controlled by two things: you enter the direction you want to go and the value of the first digit that lies in your path in that direction. The value of the first digit controls how many digits will be “eaten” as you move. If a 5 is on your right, for example, and you press the right arrow key, the 5 and the next four digits to its right
will be erased.

The catch is that you cannot make a move that would take you over a previously erased digits. It’s a lot easier to box yourself in than you might think. Be careful with this game, it can make you crazy.

Would you like to ski, silly?

It looks to me as if something was forgotten in the Makefile included in the ski source code tarball. As a result, the man page wasn’t installed and I could only play the game from the directory where I uncompressed it. To tidy things up on my system, I moved the man page (named ski.6) to /usr/share/man/man6 and the executable file (ski) to /usr/games.

Ski is another orphaned project. The original author was Mark Stevans. This release by ESR has been rewritten in python. As promised in the README, it’s fun and silly. The idea behind the game is that you are skiing downhill on powered skis. Yeti’s try to beat you up or kill you, trees get in the way, and there are treacherous patches of ice. Luckily for you, you can steer left and right, fire nuclear ICBMs, or summon the Fire Demon to assist you.

If you don’t mind silly, this game can be just as addicting as greed. Type ski at the command line to start getting silly.

An empire of one’s own

As was the case with ski, the Makefile included with the source code tarball doesn’t do installation. You still need to run make, in order to compile the program. This one written in C instead of python. According to the README, the DNA from this game is in all the versions of empire that have appeared, and there have been many. All thanks to the original work by Chuck Simmons. To complete the installation, move vms-empire.6 to /usr/share/man/man6 and the executable vms-empire to /usr/games.

It’s just you against the computer. The cities you build or capture will produce what you tell them to produce: armies, fighters, destroyers, transports, satellites, and so on. One tip before sending you noobies out to die: choose a very low level of difficulty to get started. I don’t want your blood on my hands.

There you have it, a quick tour of a few of the fun things ESR has done to make the world a little more fun for all of us. At the CLI, of course.

Greed
Ski
Empire

Category:

  • Games