nSnake is a replica of the most popular old classic snake game that was developed using ncurses C library by Alexandre Dantas. The game can be played at command-line with textual interface in almost all GNU/Linux distributions.
The game is highly customizable and includes gameplay modes, keybindings, and even the GUI-like appearance of the application. There is only one difficulty, that you will have to compile it from source, unless you’re using Arch Linux system.
- Clean GUI-like interface with nifty animations.
- Two games modes, with speed controls.
- Customizable gameplay, appearance and keybindings.
Install nSnake Old Classic Snake Game in Linux
A nSnake is available for almost all modern Linux distributions. In Ubuntu and other similar distributions it can be easily installed using apt-get command via PPA’s, but you will get version 1.5.
But, if you’re looking for a most recent version (i.e. 2.0.0), then you will need to compile it from source. So, here in this article we’re going to see how to compile the game in Ubuntu and Red Hat based systems.
Go to the official nSanke site and download the latest source tarball (i.e version 2.0.0) using below link.
Alternatively, we can also do a wget to download most recent source tarball.
# wget http://kaz.dl.sourceforge.net/project/nsnake/GNU-Linux/nsnake-2.0.0.tar.gz
Before compiling, make sure we’ve the ‘ncurses dev‘ installed on our system. To get it, simple use the following command.
$ sudo apt-get install libncurses5-dev [On Ubuntu based systems]
$ sudo yum install ncurses ncurses-devel [On Red Hat based systems]
Next, extract downloaded package and compile it as shown below.
$ tar -xvf nsnake-2.0.0.tar.gz $ cd nsnake-2.0.0 $ make $ sudo make install
By default, ‘make install‘ command installs the packages under following directories.
/usr/games/ Executable file ~/.local/share/nsnake/ Settings and Score files
But you can also define a custom directory for the installation. For example, the following ‘make install‘ will install packages under ‘/home/tecmint‘ directory.
# make install DESTDIR=/home/tecmint
How do I Play nSnake game
The instructions are the same of any snake game. You manage a hungry snake and the mission is to eat as many fruits (means $) you can. Each eaten fruit boosts it’s size by two units. When snake collides with itself or walls the game ends.
There are currently, two modes: with borders and without borders. The mission is to earn points by eating as many fruits as you can to create biggest score.
You can start the game using the following command in the terminal.
Once, the game starts in the terminal, you will see a screen similar to below.
While starting game, you can On/Off borders as well as you can choose the speed of the game level. Snake can be controlled using arrow keys.
The game can be controlled and customizable using the following keybindings.
Arrow Keys Moves the snake q Quits the game at any time p Pauses/Unpauses the game h Show help during game m Return to Main Menu
If you’ve installed the game via apt-get, you can simple use the apt-get command to remove it completely from the system.
$ sudo apt-get remove nsnake
If incase, you’ve compiled from source, you need to run the following command from the source installation directory to remove the files from the system.
# make uninstall
If you’ve specified a custom directory for installation, then define a path of installation directory along with `make` to uninstall properly.
# make uninstall DESTDIR=path-to-directory/
What’s your opinion about nSnake? Have you ever played it before? What other similar terminal games you play? Do share your views via our comment section.