nSnake classic snake game on the terminal

nsnake is a clone of the classic snake game usually found on old cellphones.
You play this game on the terminal, with textual interface.

  • Customizable gameplay, appearance and keybindings
  • GUI-like interface with nice animations
  • Levels; create your own easily
  • Lots of possible game modes; teleport, scroll map, random walls, etc. Scores are saved for each setting

nsnake is open-source and free software, made with C++ and ncurses.


Download

You can directly download and compile the latest nsnake version here.
But first, check if your Linux distro already has nsnake on the Installation section below.

Also, you can browse the whole nsnake source code online. Pick your favorite provider:

This is the download history.
You can verify the file integrity with SHA256 and its signature with my public key.

If you're interested on how this game was made, check out the tag history here.

v3.0.1 (Ago 2014) nsnake-3.0.1.tar.gz SHA256 Checksum PGP Signature ChangeLog
v3.0.0 (Jul 2014) nsnake-3.0.0.tar.gz SHA256 Checksum PGP Signature ChangeLog
v2.0.8 (Jul 2014) nsnake-2.0.8.tar.gz SHA256 Checksum PGP Signature ChangeLog
v2.0.7 (Jul 2014) nsnake-2.0.7.tar.gz SHA256 Checksum PGP Signature ChangeLog
v2.0.0 (Mar 2014) nsnake-2.0.0.tar.gz SHA256 Checksum PGP Signature ChangeLog
v1.7 (Mai 2013) nsnake-1.7.tar.gz SHA256 Checksum PGP Signature ChangeLog
v1.5 (Jan 2012) nsnake-1.5.tar.gz SHA256 Checksum PGP Signature ChangeLog

Installation

Automatic install

nsnake is available on some Linux distros.
They have the advantage of easy installing and automatic updates, but the game might not be on the latest version. If that's the case, please notify the maintainer on the package links.

Distro Install command Package link
Ubuntu apt-get install nsnake Debian Package Tracker
Debian apt-get install nsnake Launchpad
Fedora yum install nsnake Fedora Packages
OpenSUSE yast software.opensuse.org
Arch Linux yaourt -S nsnake AUR
Slackware SlackBuild

Manual install

If you want to install nsnake manually, you must have the development version of ncurses.
Then, the following commands should compile and install the game on the default directories:

$ make
$ sudo make install

If you want to test nsnake without installing, do make run.

For more info check out the README and the INSTALL files.


Levels

nsnake, since v3.0.0, supports loading custom levels (also known as mazes or maps).

They are simple text files ending with .nsnake.
To play, put them on ~/.local/share/nsnake/levels and load through in-game menus.

You can easily create your own nsnake levels!

Default levels

nsnake comes with several default levels, but they're not loaded right away!

By default they're placed on /usr/share/games/nsnake/levels. Check all of them there or download individually from the links below.

3 Hearts
Arena 00
Arena 01
Arena 02
Balls
Cave 00
Diagonal Split
Horizontal Madness
Lenny
NSNAKE
Retro 00
Retro 01
Retro 02
Retro 03
Retro 04
Retro 05
Retro 05 v2
Retro 06
Retro 07
S
Spiral Large
Squares 00
Squares 01
Squares 02
Tetris
Tricky Horizontal
Tricky
Tricky Vertical
Vertical Madness
W
Z

How to Play

The rules are the same of any snake game:

You control a hungry snake and the objective is to eat as many fruits you can. Each fruit eaten increases its size.
The game ends when the snake collides with a wall or itself. The challenge is to earn the biggest score possible by eating as many fruits as you can.

Controls

The keybindings are completely customizable on the in-game menus.
The default ones are:

Key Action
arrow keys Move the snake
q Quits the game at any time
p Pauses/Unpauses the game
h Show help during game
Page Up, Page Down First/Last item on the menu

Try man nsnake for more info.


nSnake on the Web

I'm always happy to find people enjoying nsnake.
If your site mentions it in any way, contact me so I can list it here.


I’ve always wanted a classic snake like that of Nokia. Since I still keep one of those N1280s. Anytime I feel to play a classic and simple game I just fire it up and am good to go.

Enock Seth Nyamador , from Unixmen

Contact

If you found a bug, have a suggestion or any issue, go to the GitHub bug tracker and speak up! Feel free to talk as much as you want, we'd really appreciate any help.

To contact the author personally, send a message to eu@alexdantas.net. Any words are appreciated - even if it's just "Hello, I play your game!".


Credits

nsnake was made by Alexandre Dantas with the help of many contributors. The AUTHORS file directly specifies collaborations.

Some honorable mentions:

  • Christopher Meng : Made nsnake available on Fedora and directly helped on the code many times.
  • Eriberto Mota Filho : Guided me on the whole process of packaging nsnake to Debian. It took a lot of work but he kept being patient and resolving my doubts.
    Thanks to him, nsnake got a huge popularity increase. It is available on Debian and, consequently, every Debian-based distro; like Ubuntu, Mint, ElementaryOS...