nSnake is a implementation of the classic snake game with textual interface. It is playable at command-line and uses the nCurses C library for graphics.
Started as a test for me to learn nCurses and developed to be a serious project. I maintain it via Git and host it on several sites.
Currently, it works on GNU/Linux (tested on Debian/Ubuntu/Fedora/Arch) and Microsoft Windows (tested on Windows 7).
The following commands should compile and install the game on the default directories:
$ make $ sudo make install
By default, make install places the package on the following directories:
/usr/local/bin/ Executable files /usr/local/share/man/man6/ Man page /var/games/ HighScore files
For more advanced instructions (including how to install the game on a custom
directory) see the
INSTALL file on the source root directory.
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 it's size by two units. The game ends when the snake collides with the walls or itself. Currently, nSnake has two modes: With borders and without borders. The challenge is to earn the biggest score possible by eating as many fruits as you can.
Numbers (1~9) Changes the game speed at the main menu Arrow Keys, WASD Moves the snake q Quits the game at any time p Pauses/Unpauses the game
-h, --help Displays the quick help text. -l, --license Displays the program license and warranty. -v, --version Displays the version and general information. -r, --reset-scores Resets all the Highscores to default.
This is the link to the complete documentation of the nSnake code. It was generated by Doxygen. There are links to Data Structures and Files, with a list of all containing functions and structures.
The source comes with the documentation. To create a local copy:
$ make doc
This will create and place it on the
doc/html subfolder. To access it, point
the browser to