Terminal Ping Pong ๐Ÿ“

July 9, 2025 ยท View on GitHub

A simple, fun ping pong game playable entirely in your terminal. Built with Rust and powered by ratatui for a beautifully responsive TUI (Text User Interface).

Currently, you can play against a basic AI opponent, a friend locally, or just watch AI vs AI in screensaver mode. It's fast, minimal, and runs right inside your terminal window.

Now with a customizable settings screen: choose your favorite color theme and set default difficulty for each mode!

๐ŸŽฅ Demo

Gameplay Demo
๐Ÿ–ผ๏ธ Settings & Theme Preview (click to expand) Settings Screen

โœจ Features

  • ๐Ÿ–ฅ๏ธ Single-player mode vs. computer (AI)
  • ๐Ÿ‘ฅ Local multiplayer (play with a friend on the same keyboard)
  • ๐Ÿค– Screensaver mode (AI vs AI, endless pong)
  • ๏ฟฝ Multiple color themes โ€” pick your favorite in the settings
  • ๐Ÿ› ๏ธ In-app settings: adjust default difficulty for each mode
  • ๏ฟฝ๐ŸŽฎ Real-time terminal-based gameplay
  • ๏ฟฝ Smooth and colorful UI using ratatui
  • ๐Ÿš€ Written in Rust for performance and reliability because I wanted to

๐Ÿง‘โ€๐Ÿ’ป Getting Started

Requirements

  • Rust (latest stable recommended)
  • A terminal that supports ANSI escape codes

Installation

git clone https://github.com/yourusername/terminal-pingpong.git

Clone the repository and build:

git clone https://github.com/IshmamR/terminal.pong.git
cd terminal.pong
cargo run --release

Then play directly in your terminal!

๐ŸŽฏ Controls

  • Up Arrow / Mouse scroll up: Move paddle up
  • Down Arrow / Mouse scroll down: Move paddle down
  • Space: Power move (for pro players ๐Ÿ˜‰)
  • Q: Quit

๐Ÿ›  Tech Stack

  • Language: Rust
  • UI: ratatui
  • Rendering: Crossterm-based backend

๐Ÿšง Roadmap / Planned Features

  • ๐ŸŽฎ Local multiplayer support (same terminal)
  • ๐Ÿง  Computer difficulty levels (adjustable in settings)
  • ๐ŸŒˆ Screensaver mode โ€” AI vs AI with endless pong
  • ๐ŸŽจ Theme selection and live preview in settings
  • ๐Ÿ’พ Save settings to SQLite database (persistent preferences)
  • ๐ŸŒ Network multiplayer (play with a friend remotely)
  • ๐Ÿ† High scores / stats

๐Ÿ“œ License

MIT.


Made with โค๏ธ and Rust.