Termtris - a tetris game for ANSI/VT220 terminals

screenshot running on a VT420 terminal
termtris in a color terminal termtris monochrome mode in a VT420 terminal


Termtris runs on UNIX systems and requires an ANSI or VT220-compatible terminal for input and output. It has been tested with xterm, rxvt, the Linux console, and kermit running on MS-DOS over a serial link, but it should work on any terminal capable of interpreting ANSI escape sequences for cursor addressing, character set selection, and color attributes.

To run on a terminal other than the controlling terminal, simply specify the device using the -t commandline option.

I always liked the GameBoy tetris best. So I made termtris as close as possible to that version gameplay-wise.


Additionally on GNU/Linux systems any joystick can be used to control the game. The first available joystick is used automatically, or you can specify a joystick device with the -j commandline option.

When using a joystick, even axes are mapped to left/right, Odd axes are mapped to up/down, the first four buttons rotate, and the rest of the buttons pause and unpause.

There is no way to remap the controls without changing the source code at this time.


Copyright (C) 2019 John Tsiombikas <nuclear@mutantstargoat.com>

This program is free software. Feel free to use, modfy and/or redistribute it under the terms of the GNU General Public License v3, or at your option, any later version published by the Free Software Foundation. See COPYING in the source archive for details.


Current release: termtris 1.4

Alternatively you may clone the latest version of the source code from the termtris github repository:

git clone https://github.com/jtsiomb/termtris

Pre-compiled binaries might be available in your package management system of choice, but please do not submit any bug reports without first trying to build termtris yourself from the latest git source code.

Also here is an experimental build of termtris 1.3 for windows using MSYS2 UNIX emulation layer. Of course it still requires an ANSI-compatible console, which Microsoft only very recently managed to implement in cmd.exe for windows 10.

Build instructions

There are no external dependencies. Simply type make to build, and make install if you wish to install termtris.

Default installation prefix is /usr/local. Change the PREFIX option at the top of the Makefile if you'd rather install somewhere else, or simply invoke the install rule like so:

make PREFIX=/some/other/prefix install