Terminal snake game written in C++ with ncurses.
Go to file
langurmonkey 19c5495664
Version 0.1.5
2019-11-05 16:02:20 +01:00
img update gif 2019-03-12 14:35:57 +01:00
.gitignore lots of features, command line options, maps 2019-03-08 11:26:18 +01:00
InputParser.cpp lots of features, command line options, maps 2019-03-08 11:26:18 +01:00
InputParser.h lots of features, command line options, maps 2019-03-08 11:26:18 +01:00
LICENSE Add LICENSE 2019-03-06 21:13:57 +00:00
Makefile update readme 2019-03-08 15:50:59 +01:00
README.md docs: update readme 2019-10-31 15:30:26 +01:00
tsnake.1 docs: touched up help and readme 2019-03-12 14:54:14 +01:00
tsnake.cpp Version 0.1.5 2019-11-05 16:02:20 +01:00
tsnake.h2m add make install target and created man page 2019-03-08 13:43:49 +01:00


tsnake, a terminal snake game

tsnake is a terminal snake game written in C++ using the ncurses library with support for maps and interactive resizing.


Move the snake using the arrow keys [↑↓←→], [wasd] or vi's [hjkl]. Here are some controls:

  • [p] Pause the game
  • [r] Restart with next map
  • [q] Quit

The game starts with a speed of 2 m/s and every 20 points the speed is increased until a maximum of 20 m/s. If cheat mode is enabled (--cheat), the speed can be increased with [+] and decreased with [-].

The game has a few maps which can be chosen using the -m option. Otherwise, maps are cycled automatically when the game is restarted.


  • C++17
  • ncurses


If you are on Arch Linux or derivatives, use our tsnake AUR package:

$  yay -S tsnake

You are done.

If you are on any other distro, first clone the repository.

$  git clone git@gitlab.com:langurmonkey/tsnake.git && cd tsnake

Then, build and install the software.

$  make && make install

You may need to run the make install as a superuser.


To run the software, just do:

$  tsnake


Here is the info listed by the --help flag.

Usage: tsnake [OPTION]...

 -h		shows usage information
 -v		prints version and exit
 -n [SIZE]	set inital size of snake, which defaults to 4
 -m [MAP_NUM]	number of the first map to use as an integer, which is cycled
		using (map % nmaps)
 -c		deactivate colors
 -x, --cheat	activate cheat mode where speed can be increased and
		decreased with '+' and '-'

Also, you can check out the man page after installing if you wish.

$  man tsnake