TUIClassics

Classic terminal games rebuilt in Go with Bubble Tea.

★ 2 stars Go 100% MIT License Oct 2025
tuiclassics - snake
  +------------------------------+
  |                              |
  |       @@@@                  |
  |           @                 |
  |           @    *            |
  |           @@@@@            |
  |                              |
  +------------------------------+
  Score: 42  |  Level: 3
>

Project Overview

TUIClassics is a collection of classic terminal games built entirely in Go using the Bubble Tea TUI framework. Snake, Tetris, Minesweeper, and more -- all running in your terminal with smooth rendering and responsive controls.

This project was born from the excitement of the Go/TUI era. After building TFE, the natural next step was to explore game loops in Bubble Tea. Each game became a lesson in terminal rendering constraints, tick-based updates, and making genuinely fun experiences with nothing but characters on a screen.

{}

Tech Stack

Go
The entire collection in pure Go. Fast compilation, zero dependencies at runtime.
Bubble Tea
Elm architecture for each game. Msg-based game loops with tick commands.
Lipgloss
Terminal styling for game boards, borders, score displays, and menus.
Bubbles
Pre-built components for menus, text inputs, and game selection UI.
#

Architecture

  TUIClassics Game Architecture
  ==============================

  main.go --> Game Selector Menu
                    |
        +-----------+-----------+
        |           |           |
   snake/     tetris/   minesweeper/
   model.go   model.go   model.go
   view.go    view.go    view.go

  Each game implements:
    Init()    -- initial state
    Update()  -- handle input + tick
    View()    -- render to string
*

Key Features

Snake
Classic snake game with growing tail, food spawning, collision detection, and increasing difficulty levels.
Tetris
Full Tetris with piece rotation, line clearing, next-piece preview, and scoring system.
Minesweeper
Grid-based minesweeper with flag placing, flood-fill reveal, and configurable difficulty.
Game Selector
Menu-based launcher to browse and start any game in the collection. Lipgloss-styled cards.
Tick-Based Loops
Bubble Tea tick commands drive game loops at configurable frame rates. Smooth terminal rendering.
Terminal Rendering
Box-drawing characters, color gradients, and Unicode blocks create visually rich game boards.
~

Stats

2
Stars
100%
Go
407
KB Size
MIT
License
Oct 20
Created 2025
3+
Games
!

Lessons Learned

Game loops in Bubble Tea are elegant. You send a tick message, process it in Update, and return a command for the next tick. Terminal rendering constraints force you to be creative -- you only have characters, box-drawing, and ANSI colors. And somehow that limitation makes the games more fun to build. Every pixel is a deliberate choice.