The Intel Edison is a tiny computer the size of an SD card, which runs a type of Linux called "Yocto" Linux. This is different from Debian, which runs on the more familiar Raspberry Pi computer. The only way to access Linux on the Edison is through the command line (similar to cmd on Windows), where you type in commands to get work done.
Even though Linux command line is a powerful tool, its much more dull and boring than modern OSes like Windows and OSX. Nope, you won't be able see pictures, videos, YouTube or FaceBook; command line is made mostly for nerds.
But wait, there is a glimmer of hope for normal people like you and me. After 3 hours of frantically typing commands and pulling out my hair, I did a little research, and found out, thatthere are games for the Linux command line too!
These games are totally different from, say, GTA5 or Dungeons and Dragons, as they do not contain graphics or video or even pictures. Instead, games on the command line use only text to create the graphics of the game. They may not as enthralling and visually sophisticated as FIFA15 or Assassin's Creed, but they are definitely fun to play and, in fact, look pretty nerdy too (but well, command line users are nerds).
On the more well known and familiar Raspberry Pi, most games can be installed on Debian using a single 'apt-get' command. In Yocto Linux, unfortunately, the package manager, opkg, does not have any games on its list.
Therefore, in this Instructable, I'll show you how to download and install a few games, step by step. These instructions will help you get accustomed to using command line, and download other games with ease.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Prerequisites...
- An Intel Edison on it's breakout board
- A USB mini cable
- WiFi with internet access
- A computer
Before going further, you must first set up your Edison; by which I mean you should have done all the following things:
- Installed all required drivers on the computer
- Flashed the OS on the Edison
- Set up WiFi
- Upgrade the Edison's Linux image (aka OS)
- SSh-ed into the Edison.
All these steps are covered in detail in my guide here.
You should have at least some familiarity with Linux Command line, as we will be using Linux commands extensively in this guide. Don't fret if you're new to this, check out this guide for help...
Creating A "Games" Folder:
- Download and install WinSCP.
- Open the program, and type in the Edison's IP address, username (which is root), and your password, then press login.
- After successfully logging in, make sure you are in the Edison's /home/root/ directory. Then right click, select new > directory.
- Name the directory as "games" or "funn" or "sausages" or whatever you find suitable.
Step 2: 2048 (Yes, on Linux Terminal!)
Who doesn't know 2048? This game popular on the Apple and Android app stores is truly addictive. And guess what, its on LINUX TERMINAL!!!
Well, as we don't have touch control on linux, this game is played using the arrow keys, but nevertheless it is quite fun to play. Now follow these steps to get 2048 on the Edison:
- Open a terminal to your Edison.
- Type in these commands:
gcc -o 2048 2048.c
- Now go to WinSCP and login to the Edison.
- There'll be a file '2048'. Move that file to the "Games" directory by simply dragging it and dropping over the "Games" directory - Exactly how you would do on Windows or Mac.
- Now, to run the game, simply go the "Games" directory:
- And run the game with this command.
Yayyy! You should now be abe to play 2048 on your Edison!
Step 3: Moon Buggy...
Another great game on linux terminal that can be played on the Edison. Ideal for passing time when life gets boring.
To download and install:
- On the terminal, type:
tar xvf moon-buggy-1.0.51.tar.gz
- Now in the terminal type ls to see the name of the unzipped file
Step 4: Ski...
One of those games that require a bit of imagination, but really builds up to excitement, Ski lets you incarnate a skier trying to avoid the danger of the mountain and a hunting yeti.
To download and install the game, follow these steps:
- Type this into the terminal:
- Now type ls and check if ski-6.9.tar.gz file is present. if it is, type this command:
tar xvf ski-6.9.tar.gz
- Delete the .tar.gz file using rm ski-6.9.tar.gz.
- Go into the output directoryput
- Now, see if the make run command returns any results. If it does, type in make install and to
Step 5: NInvaders
nInvaders is a traditional space invader game made for the linux command line. All you've got to do is shoot down a bunch of UFOs planning to destroy Earth. It may be a little on the difficult side, but once you get the hang of it, it is pretty much addictive. To download nInvaders:
- On the terminal type wget http://liquidtelecom.dl.sourceforge.net/project/ninvaders/ninvaders/0.1.1/ninvaders-0.1.1.tar.gz
- After the download is finished, unzip the file using the tar command (See previous steps for help)
- Now go into the unzipped folder using the cd command.
- Type in make.
- After the installation, you should be able to run the game using ./ninvaders.
Step 6: Frozen Depths
Frozen depths is another roguelike game with an entertaining atmosphere. I'm gonna challenge you to figure out the way to download and install this game on your Edison; do it just like you did for moonbuggy or nInvaders. Here is the download page.
- Use the wget command to start the download.
- You have to unzip the file before installation.
- After entering the unzipped folder, search for either a makefile or ./configure file.
- Install using the make install or ./configure command, depending on the condition above.
Step 7: Get More Games!
These aren't the only games you can download on the Edison; virtually any game that can run on command line can be installed! But before downloading, you have to:
- Find the download link.
- Make sure it doesn't use a mouse or any other device for interface (except the keyboard)
- Make sure it's made FOR command line ONLY.
- See that it isn't too heavy on the processor.
While the steps for downloading and installing different games can vary, there are a few common steps one should try:
- Use wget to download the game's file(s).
- Use tar xvf "downloaded_file_name" to unzip the downloaded file (if it is compressed and has .tar or .tar.gz at the end of the file name.
- Use unzip commmand to unzip a .zip file.
- Go into the unzipped directory and search for a Makefile or a ./configure file.
- If you have trouble installing, refer to the README in the directory for instructions. Use nano, a friendly text editor, to view the README document.
- After installing, use ls to view all files in the directory. If you find a file with the name of the game, then run the game by typing ./game where "game" is the name of that file
In this way, downloading simple retro-style games on the Edison will be super easy. Here are some links for you to find out more games for Linux command line. Have fun!
If you have a problem downloading or installing anything, leave a query in the comments below!