shalom2552/tuitris

Zero-dependency Tetris clone TUI writen in pure C.

C

2

59 commits

updated Sep 27, 2026

See the code

See what people are saying

SourceMessageScoreDate

A Tetris clone TUI with bare C (r/commandline)

Used only ANSI escape codes and text, no dependencies or extra libraries (like ncurses), just compile and play. NO AI USED AT ANY LEVEL. Check out the repo, any issues, bugs or feature PRs are welcome. https://github.com/shalom2552/tuitris Would love to know what you guys think of it, or hear any…

8

Sep 27, 2026

README

Tuitris

Tetris clone TUI for the terminal. Written in pure C with no external libraries, rendering is raw ANSI escape sequences, raw-mode input with alt-screen, pthreads for the game loop, and no memory allocations.

Requirements

  • gcc and make
  • POSIX system
  • Terminal with UTF-8 and ANSI color support

Run

make run    # build and run

Controls

KeyAction
Up / DownNavigate the menu
EnterSelect menu item
Left / RightMove piece left / right
DownMove piece down
R or SpaceRotate clockwise
PPause / resume
HShow help
QQuit to menu

Features

  • 10 by 20 board with seven tetromino types.
  • Side panel with game stats.
  • Next-piece preview.
  • Max score across runs.
  • Pause screen and help.
  • Title art picks over three sizes based on terminal size.

Scoring

  • 10 points per new piece.
  • 100 * level * lines * lines for clearing lines.
  • Level is 1 + lines cleared / 10. Every 10 lines, level up.
  • Speed increase every level by 100ms. Delays 1000ms down to 100ms.

Layout

main.c        menu loop and entry point
inc/          headers
  board.h     board grid
  color.h     colors
  game.h      game loop
  help.h      help screen
  input.h     key events
  menu.h      main menu
  state.h     game stats
  tetromino.h pieces
  ui.h        game screen drawing
  ui_assets.h constanta for ui
  tdraw.h     header-only terminal drawing helpers
src/          implementations

License

MIT. See LICENSE.

Contributors

shalom2552

59 commits

shalom2552/tuitris

Zero-dependency Tetris clone TUI writen in pure C.

C

2

59 commits

updated Sep 27, 2026

See the code

See what people are saying

SourceMessageScoreDate

A Tetris clone TUI with bare C (r/commandline)

Used only ANSI escape codes and text, no dependencies or extra libraries (like ncurses), just compile and play. NO AI USED AT ANY LEVEL. Check out the repo, any issues, bugs or feature PRs are welcome. https://github.com/shalom2552/tuitris Would love to know what you guys think of it, or hear any…

8

Sep 27, 2026

README

Tuitris

Tetris clone TUI for the terminal. Written in pure C with no external libraries, rendering is raw ANSI escape sequences, raw-mode input with alt-screen, pthreads for the game loop, and no memory allocations.

Requirements

  • gcc and make
  • POSIX system
  • Terminal with UTF-8 and ANSI color support

Run

make run    # build and run

Controls

KeyAction
Up / DownNavigate the menu
EnterSelect menu item
Left / RightMove piece left / right
DownMove piece down
R or SpaceRotate clockwise
PPause / resume
HShow help
QQuit to menu

Features

  • 10 by 20 board with seven tetromino types.
  • Side panel with game stats.
  • Next-piece preview.
  • Max score across runs.
  • Pause screen and help.
  • Title art picks over three sizes based on terminal size.

Scoring

  • 10 points per new piece.
  • 100 * level * lines * lines for clearing lines.
  • Level is 1 + lines cleared / 10. Every 10 lines, level up.
  • Speed increase every level by 100ms. Delays 1000ms down to 100ms.

Layout

main.c        menu loop and entry point
inc/          headers
  board.h     board grid
  color.h     colors
  game.h      game loop
  help.h      help screen
  input.h     key events
  menu.h      main menu
  state.h     game stats
  tetromino.h pieces
  ui.h        game screen drawing
  ui_assets.h constanta for ui
  tdraw.h     header-only terminal drawing helpers
src/          implementations

License

MIT. See LICENSE.

Contributors

shalom2552

59 commits

Languages

C

98.8%

Makefile

1.2%